Stage 03
1) Stage summary This Stage starts by downloading a stellar model or calculating one in case of the black body spectrum.
Note
PACMAN currently offers the following stellar models:- THE 1993 KURUCZ STELLAR ATMOSPHERES ATLAS (k93models)- THE STELLAR ATMOSPHERE MODELS BY CASTELLI AND KURUCZ 2004 (ck04models)- THE PHOENIX MODELS BY FRANCE ALLARD AND COLLABORATORS (phoenix)-blackbodyspectrumThe stellar models (exluding the blackbody) are retrieved from https://archive.stsci.edu/hlsps/reference-atlases/cdbs/grid/Warning
If the user decides on any stellar model which has to be downloaded (
k93models,ck04modelsorphoenix), then internet connection is required! The blackbody model does not require a connection however.
The user sets Teff, logg and MH in the pcf file. For k93models, ck04models and phoenix the closest available metallicity,
then the closest available effective temperature and finally the closest available surface gravity is searched and then used.
To see the workflow see the code block below.
Let’s look at an example for GJ 1214: We use the stellar parameters published in Cloutier et al. 2021.
Let’s use an k93models model.
2) Run PACMAN
Navigate to pacman_run_files and open run_pacman.py.
Comment out Stage 02 and uncomment Stage 03:
# meta = s02.run02(pcf_path=pcf_path)
meta = s03.run03(pcf_path=pcf_path)
Then run:
python run_pacman.py
3) What happens?
PACMAN reads the most recent stage02/s02_run_* directory and creates a new Stage 03 workdir:
stage03/s03_run_YYYY-MM-DD_HH-MM-SS
Starting s03
Using Stage 02 input directory: /Users/sebastianzieba/Desktop/Projects/Observations/Hubble/GJ1214_13021_2026/stage02/s02_run_2026-05-26_12-44-31
Location of the new Stage 03 run directory: /Users/sebastianzieba/Desktop/Projects/Observations/Hubble/GJ1214_13021_2026/stage03/s03_run_2026-05-26_12-51-37
Location of PACMAN: /Users/sebastianzieba/Desktop/Projects/Open_Source/PACMAN/src/pacman
Using k93models model.
Possible metallicities: [ 1. 0.5 0.3 0.2 0.1 0. -0.1 -0.2 -0.3 -0.5 -1. -1.5 -2. -2.5
-3. -3.5 -4. -4.5 -5. ]
For input metallicity 0.29, closest metallicity is 0.3.
Possible effective temperatures: [10000. 10500. 11000. 11500. 12000. 12500. 13000. 14000. 15000. 16000.
17000. 18000. 19000. 20000. 21000. 22000. 23000. 24000. 25000. 26000.
27000. 28000. 29000. 30000. 31000. 32000. 33000. 34000. 3500. 35000.
3750. 37500. 4000. 40000. 4250. 42500. 4500. 45000. 4750. 47500.
5000. 50000. 5250. 5500. 5750. 6000. 6250. 6500. 6750. 7000.
7250. 7500. 7750. 8000. 8250. 8500. 8750. 9000. 9250. 9500.
9750.]
For input effective temperature 3250, closest temperature is 3500.0.
Was the stellar model fits file called kp03_3500.fits already downloaded?: False
+ Downloading file kp03_3500.fits from https://archive.stsci.edu/hlsps/reference-atlases/cdbs/grid/k93models/kp03/kp03_3500.fits.
Possible logg: [0. 0.5 1. 1.5 2. 2.5 3. 3.5 4. 4.5 5. ]
For input logg 5.026, closest logg is 5.0.
Using g141 grism.
Saving Metadata
Finished s03
Note
The stellar models are saved inside the current Stage 03 workdir. E.g., .../stage03/s03_run_2022-03-04_15-10-29/ancil/stellar_models/k93models/kp03_3500.fits.
If the file already exists then it will not be downloaded again.
After downloading or calculating the stellar spectrum, it is multiplied by the grism throughput (if the observations used G102 or G141 is recognized automatically).
The bandpass files are stored in the PACMAN package directory
(e.g., PACMAN/src/pacman/data/bandpass).
The final plot of this stage shows the stellar spectrum, the bandpass and the product of these two. This product is used as the reference spectrum for wavelength calibration.
user
└── Desktop
└── Projects
└── Observations
└── Hubble
└── GJ1214_13021
├── pacman_run_files
│ ├── run_pacman.py
│ ├── fit_par.txt
│ └── obs_par.pcf
├── stage00
│ └── s00_run_2022-03-04_15-10-29
│ ├── ...
├── stage01
│ └── s01_run_2022-03-04_15-10-29
│ ├── ...
├── stage02
│ └── s02_run_2022-03-04_15-10-29
│ ├── ...
└── stage03
└── s03_run_2022-03-04_15-10-29
├── ancil
│ ├── refspec
│ └── refspec.txt
│ └── stellar_models
│ └── k93models
│ └── kp03_3500.fits
├── figs
│ └── s03_refspec
│ └── refspec.png
│ └── s03_smooth
│ └── smooth.png
├── fit_par.txt
├── obs_par.pcf
├── s03.log
├── WFC3_Meta_Save.dat
└── filelist.txt