Skip to content

catherine-manea/BACCHUS_Tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 

Repository files navigation

BACCHUS_Tools

Python functions for automating BACCHUS

Step 1: open bacchus_tools.py and change BACCHUS_DIR to point to your BACCHUS directory

Step 2: open up a terminal and cd to your BACCHUS_DIR (cd /path/to/BACCHUS)

Step 3: make sure your terminal is searching for executables in your current working directory (e.g., type PATH=$PATH:./ or add your BACCHUS_DIR to your .bash_profile)

Step 4: open init.com (e.g., vim init.com) and ensure everything is as you'd like (e.g., are you solving for Teff, logg, [M/H], vmic, and convol? are your linelists and lineselections correct? etc.)

Step 5: open stellar_parameters.tab (e.g., vim stellar_parameters.tab) and add in a line corresponding to the star whose spectrum you'd like to measure. Save edits and return to terminal.

    NOTE: stellar_parameters.tab MUST be tab-delimited or some of these BACCHUS tools won't work. so each line should read:

    <star_name>\t<path_to_spectrum>\t<Teff_init>\t<logg_init>\t<[M/H]_init>\t<vmic_init (-99 if unknown) >\t<convolution_init>\t<rv_init (MUST BE 0 since spectrum must be rv-corrected) >

    WHERE \t IS LITERALLY A TAB

Step 6: Start an iPython instance (type ipython)

Step 7: import your functions: import sys sys.path.append("/path/to/BACCHUS_Tools") import bacchus_tools as b

Step 8: let's get the stellar parameters for a star that you named "star" in stellar_parameters.tab: b.get_star_param(star)

Step 9: if you don't like the output from the last run, let's rerun our stellar parameters, using the output from the last run as our initial guess: b.redo_if_necessary(star)

Step 10: let's get the star's abundances in Fe, Mg, and Nd: b.get_abund(star, elements=['Fe', 'Mg', 'Nd'])

Step 11: if you would like simple summary tables, let's extract all the abundances and produce some (saves ascii tables in a few new files in your STAR directory): b.get_bracket_abunds(star)

Step 12: now, let's get differential stellar parameters for star2 with respect to star (see, e.g., Yong et al. 2023). First edit stellar_parameters.tab to include info for star2, and then run: b.run_star_diff(star2, star) #if you wanna redo your stellar parameters using the output of the last run as the initial guess: b.redo_diff_if_necessary(star2, star) #etc.

Step 13: once you're happy with your differential stellar parameters, get your abundances using the same code as in Step 10. Note, you will need an extra step afterwards to get differential abundances relative to your reference star, but that tool is not yet publicly available. Let me know if anyone wants it!!

More tools to come, if you use this code and see something else you want, please let me know: catherinemanea@gmail.com OR open an issue.

About

Python functions for automating BACCHUS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages