Skip to content

astrobmm/fastrot-spec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

213 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastrot-spec

This suite of codes computes the surface parameters -radius, temperature, and effective gravity as a function of the latitude- of rapidly rotating stars with radiative envelopes, and builds their synthetic spectra.

The parameterisation of the stellar surface is done using the semianalytical approach of the ESTER model presented by Espinosa-Lara and Rieutord (2011); that approach avoids any discussion about the gravity darkening exponent. The computation of the synthetic spectrum is done using the atlas9 and synthe suite of codes by Kurucz (2014). Three main codes are provided in folder 00_codes/, namely star3d, highrespec3d, and lowrespec3d. star3d computes the parameterization of the stellar surface that will be used by the other two programs to compute the high-resolution (3600-5500 A, R=100,000) and low-resolution (90-1.0e+6 A, variable resolution with wavelength, according to that of the Castelli-Kurucz ODFNEW models).

The whole procedure is described in the paper "Surface parameterisation and spectral synthesis of rapidly rotating stars. Vega as a test bed" (Montesinos, B., 2024, Astronomy and Astrophysics, 688, A97).

June 2024:

  • Programs star3d, spec3d and normspec provided. Range of temperatures for the models: 7000-11000 K.

October 2025:

  • Updates and improvements have been added with respect to the first versions of the codes. Use the new versions of the codes and scripts in case the original ones are used; the new codes supersede the old ones.
  • Program spec3d has been splitted into highrespec3d and lowrespec3d```.
  • Program star3d includes a small modification required for the new code lowrespec3d to work.
  • The computation of the limb darkening coefficients has been improved, attempting to gain speed in the calculations.

November 2025:

  • Small modifications to create auxiliary files have been done on star3d, lowrespec3d and highrespec3d. The modifications do not affect the calculations of the final spectrum, and have been done for plotting purposes. The two shell files fastrot-highres-spec.sh and fastrot-lowres-spec.sh have been modified accordingly. If you have previous versions of the codes, update the whole contents of folder 00_codes/ to have consistent versions. Two additional programs have been added: grid10 and mergefiles mainly devoted to generate some files for plotting purposes (see all the information in the README file in folder 00_codes/).
  • The grid of synthetic spectra that is required to compute the composite final spectrum of a given object has been enlarged. See all the information in the README file in folder 00_models/.
  • Python programs for plotting useful graphs and pdf examples of the output of these programs are provided in folder 22_for_plotting/. This is a new folder, follow the instruction given in the nexr paragraph.

Installation & Requirements

Clone the following structure of folders on your computer. Your must have at the same level these six directories:

00_codes/
00_ld/
00_models/
00_pckfiles/
11_results/
22_for_plotting/

Download and unzip the zip files in folder 00_models/ which contain the high-resolution synthetic spectra computed for eight values of the metallicity, namely [M/H]= -2.5, -2.0, -1.5, -1.0, -0.5, +0.0, +0.2, +0.5 (Kurucz's way of labelling this files has been used: m25, m20, m15, m05, p00, p02, p05 ('m', 'p' stand for 'minus', 'plus'). These are used to compute the emergent high-resolution spectrum of the target object using the programme highrespec3d.WARNING: Mac computers unzip zip files in two different ways: is you use unzip from the terminal, the uncompressed files will be stored in the current directory, however, if you decompress the zip file clicking on the icon, a folder with the name of the zip will be created in the current directory and the files will be stored there. Check that the models are in 00_models/ before running the code.

Download and unzip the file in folder 00_ld. This zip file contains eight files corresponding to the eight values of the abundance. They are used to compute limb darkening coefficients.

Download and unzip the two zip files in folder 00_pckfiles/ which contain the collection of low-resolution Castelli-Kurucz models for the eigh metallicities specified in the above paragraph. These models are used to compute the low-resolution spectrum using the program lowrespec3d.

Download the files in folder 22_for_plotting/.

How to run the codes

The codes are written in fortran77, so you must have a fortran compiler in your system. Go to folder 00_codes/ and compile the programs; in linux platforms this works:

gfortran -std=legacy star3d.f -o star3d.exe
gfortran -std=legacy highrespec3d.f -o highrespec3d.exe
gfortran -std=legacy lowrespec3d.f -o lowrespec3d.exe
gfortran -std=legacy normspec.f -o normspec.exe
gfortran -std=legacy grid10.f -o grid10.exe
gfortran -std=legacy mergefiles.f -o mergefiles.exe

Some tests were made on Macs laptops, a fortran compiler such is the one in

[https://github.com/fxcoudert/gfortran-for-macOS/releases]

seems to work, using the same commmand as above.

Make sure the scripts fastrot-highres-spec.sh and fastrot-lowres-spec.sh have the option to be executable, to check that type:

ls -l *.sh

and see if you get something like -rwx------, if that is not the case, type:

chmod u+x *.sh

To run the codes, use the input files given in the directory 00_codes/, and just type:

./fastrot-highres-spec.sh

or

./fastrot-lowres-spec.sh

And that's it! Your results will be in folder 11_results/ and files suitable to be plotted will be in folder 22_for_plotting/.

Another option is to use the two python scripts stored in 00_codes/. run_from_python.py runs the whole code from the terminal, and functions_python.py allows the user to call the code from an independent python code, e.g. if a grid of models with different input parameters needs to be built, that function would link the python code written by the user, which generates a set of input parameters, with the fortran codes.

A description of the input and output files can be found in 00_codes/README_inputs_outputs.txt.

A description of the synthetic models, and the inventory of what is stored there, can be found in 00_models/README_Inventory.txt.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published