B2: Compulsory exercise General instructions: Please name your files as requested in exercises. Add your student number to the beginning of each file name, e.g. 014288978A1avalmis.txt. Send only the files requested in the exercise. This will make the job of the course assistants considerably easier. Failing to do so will affect your grading. Note: Use of Return key to execute a command will no longer be shown. • Exercise B2a (linux, emacs) Go to your directory /home/username/latex/ Copy from the course website B2akesken.tex Copy it as a new file: cp B2akesken.tex B2avalmis.tex Command pdflatex B2avalmis.tex produces an error ie. LATEX ”crashes”. This is happens because in file B2avalmis.tex there is one mistake in every chapter % Kappale 1, % Kappale 2, % Kappale 3, % Kappale 4 and % Kappale 5 Fix these five errors. Requirements for this exercise: Exercise is ready, when latex B2avalmis won’t “crash” and the result is the same as in the next page: Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. Tavoitteenani on tuottaa paljon lihavoitua teksti¨ a. MUTTA VAIN ¨ AN ¨ KAPPALEEN VERRAN! TAM Tavoitteenani on laatia “in line math” kaava. Yksi Einsteinin kuuluisimmista kaavoista on E = mc2 , jonka tuntee moni. Tavoitteenani on laatia “display math” kaava. Harvempi tiet¨a¨a, ett¨a Einstein sai Nobelin kaavasta E = hf, eik¨ a tuosta ylemm¨ ast¨ a kaavasta. Yrit¨ an luoda uuden oman komennon, mutta jotain t¨ass¨a nyt kyll¨a menee pieleen. Kyll¨ a yksi Nobelin palkinto, on ihan kelpo saavutus. Tavoitteenani on, ett¨ a tekstiss¨ a alla vain sana “Einstein” olisi kursivoitu. Einstein saavutti paljon muutakin, joten nuo tuolla yll¨a manitut olivat vain joitakin tunnetuimpia. Oli ihan kiva jos t¨ am¨ a kursivointin vihdoin p¨a¨attyisi. Oli ihan kiva jos t¨ am¨ a kursivointin vihdoin p¨ a¨ attyisi. Oli ihan kiva jos t¨am¨a kursivointin vihdoin p¨ a¨ attyisi. Oli ihan kiva jos t¨ am¨ a kursivointin vihdoin p¨a¨attyisi. Oli ihan kiva jos t¨ am¨ a kursivointin vihdoin p¨ a¨ attyisi. Oli ihan kiva jos t¨am¨a kursivointin vihdoin p¨ a¨ attyisi. Oli ihan kiva jos t¨ am¨ a kursivointin vihdoin p¨a¨attyisi. 1 • Exercise B2b (emacs, LATEX, ADS) Go to your directory /home/username/latex/ In this directory start editing the source file: emacs B2bviitteet.bib & Copy with the mouse from the ADS database for the following publications: Duquennoy et al., 1992, A&A, 254, L13 Goldman & Mazeh, 1994, ApJ, 429,362 Zahn, 1989, A&A, 220, 112 reference infrormation Bibtex entry for this abstract one by one, each after another to the file: B2bviitteet.bib. Save the file B2bviitteet.bib. Note: Copy everything between @ARTICLE and the last } character. Don’t remove or add anything. Start a new row for each reference. After this: change the article labels in the file B2bviitteet.bib as shown below 1989A&A...220..112Z, to Zah89, 1994ApJ...429..362G, to Gol94, 1992A&A...254L..13D, to Duq92, Copy following files from the course website: aa.bst, aa.cls and B2bkesken.tex to the same directory. Copy file to a new file: cp B2bkesken.tex B2bvalmis.tex Edit in the file B2bvalmis.tex following four parts: Oppi1 to \citet{Duq92} Oppi2 to \citep{Gol94} Oppi3 to \citep{Zah89} Oppi4 to \citet{Gol94} Do the following commands latex B2bvalmis bibtex B2bvalmis latex B2bvalmis latex B2bvalmis dvips B2bvalmis -o Check the result running command: evince B2bvalmis.ps & Requirements for this exercise: Exercise is ready when latex B2bvalmis doesn’t “crash” and the result looks the same as in the next page: All these circumstances raise serious questions regarding the evolutionary and dynamical history of this system. As was noted by Duquennoy et al. (1992), the separation of the two components at periastron would be equivalent to that of a circular orbit with a period of just 3.5 d. This short timescale is similar to the expected tidal-shear timescale (Goldman & Mazeh 1994) and suggests tidal interaction at least during periastron passage. ... An evolutionary scenario based on a theory for the coupling of the envelope shear with a constant turbulent viscosity (Zahn 1989) would require an initial semi-major axis of about 1 pc and an even higher eccentricity. Such a large separation between the components would make the survival of the system very unlikely. Goldman & Mazeh (1994) favored a quadratic reduction of the convective-envelope viscosity over time References Duquennoy, A., Mayor, M., Andersen, J., Carquillat, J. M., & North, P. 1992, A&A, 254, L13 Goldman, I. & Mazeh, T. 1994, ApJ, 429, 362 Zahn, J.-P. 1989, A&A, 220, 112 • Exercise B2c (python,octave) Go to a directory you created earlier: /home/username/programs/ From the course website: copy to this directory python program Pharjoitus3.py Run the program: python Pharjoitus3.py Question 1: Why does this program Pharjoitus3.py “crash”? Create to directory /home/username/programs/ your own new octave program Oharjoitus3.m, which does the same things as similarly as possible as the python program Pharjoitus3.py. You can replace python command print() in your new octave program using either disp or printf commands. Check, that your new octave program doesn’t crash, when you run it: octave Oharjoitus3.m Copy to your directory /home/username/programs/ from the course website octave program Oharjoitus4.m. Create your own python program Pharjoitus4.py to /home/username/ohjelmat/, does as similarly as possible the same things as the octave program Oharjoitus4.py. Check that your python program doesn’t crash, when you run it: python Pharjoitus4.py Requirements for this exercise: Answer briefly to question 1. Create a new octave program mentioned above, that doesn’t crash when you run it using: octave Oharjoitus3.m Create a new python program mentioned above, that doesn’t crash when you run it using: python Pharjoitus4.py Turning in the exercises Send an e-mail to the course assistant, with brief answer to B2c question 1, attaching the files: B2a: B2avalmis.tex and B2avalmis.pdf B2b: B2bvalmis.tex, B2bviitteet.bib and B2bvalmis.pdf B2c: Oharjoitus3.m and Pharjoitus4.py
© Copyright 2024 ExpyDoc