Skip to content

Commit ad917c0

Browse files
committed
actually test the etc...for crires+!
1 parent bbd44d7 commit ad917c0

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/scope/calc_quantities.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,14 @@ def calc_snr(param, args, data):
9393
data["P_rot"] * (data["phase_end"] - data["phase_start"]) * 24 * 3600
9494
) # in seconds
9595
exptime = duration / n_exposures - detector_reset_time
96+
teff = data["Teff_star"]
97+
logg = data["logg_star"]
9698
# ok this is pretty good lol
9799

98100
if instrument == "IGRINS":
99101
snr = scrape_igrins_etc(kmag, exptime)
100102
elif instrument == "CRIRES+":
101-
snr = scrape_crires_plus_etc(kmag, exptime)
103+
snr = scrape_crires_plus_etc(kmag, teff, logg, exptime)
102104
else:
103105
logger.error(f"Unknown instrument {instrument}!")
104106
# need to construct a JSON object to send to the CRRIES+ SNR calculator.

src/scope/input.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@
1010
#·······································:
1111
Created: 2024-08-15
1212
Author: Arjun Savel!
13-
Planet name: WASP-76 b
13+
Planet name: WASP-166 b
1414

1515
# Simulation setup
1616

17-
modelname wasp_166_150seed_ld # name of the model. used for saving the output files.
17+
modelname wasp166_test # name of the model. used for saving the output files.
1818
seed 150 # seed for the random number generator when generating noisy data. set to None for a random seed.
1919
log_level DEBUG # logging level above which statements are printed. Supported levels are ``DEBUG``, ``INFO``, ``WARNING``, ``ERROR``, and ``CRITICAL``.
2020

@@ -33,6 +33,8 @@ b DATABASE # impact parameter of the planet's orbi
3333
Rstar DATABASE # stellar radius, in solar radii. [DB]
3434
Mstar DATABASE # stellar mass, in solar masses. [DB]
3535
Kmag DATABASE # K-band magnitude of the star. [DB]
36+
Teff_star DATABASE # effective temperature of the star, in K. [DB]
37+
logg_star DATABASE # surface gravity of the star, in cm/s^2. [DB]
3638
kp 128.1 # expected planetary orbital velocity assuming circular orbit, in km/s. input NULL if you'd like to calculate from orbital parameters.
3739
v_sys 0.0 # systemic velocity, in km/s. [DB]
3840
v_rot NULL # equatorial rotational velocity. input NULL if you'd like to calculate from orbital parameters.
@@ -48,7 +50,7 @@ lambda_misalign 0 # misalignment angle of the planet's or
4850
inc 90.0 # inclination of the planet's orbit with respect to the line of sight, in degrees. only matters if include_rm is set to True. and observation is set to transmission.
4951

5052
# Instrument Parameters
51-
instrument IGRINS # name of the spectrograph to simulate. currently spectrographs are ``IGRINS`` and ``CRIRES+``.
53+
instrument CRIRES+ # name of the spectrograph to simulate. currently spectrographs are ``IGRINS`` and ``CRIRES+``.
5254
blaze True # whether to include a blaze function or not.
5355
wav_error False # whether to include wavelength solution errors or not.
5456
order_dep_throughput True # whether to include order-dependent throughput variations.

src/scope/input_output.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ def __init__(self, message="scope input file error:"):
4343
"v_rot_star": "st_vsin",
4444
"b": "pl_imppar",
4545
"Kmag": "sy_kmag",
46+
"Teff_star": "st_teff",
47+
"logg_star": "st_logg",
4648
}
4749

4850

@@ -215,6 +217,8 @@ def parse_input_file(
215217
"Mp",
216218
"peri",
217219
"Kmag",
220+
"Teff_star",
221+
"logg_star",
218222
]
219223

220224
# Convert values to appropriate types

0 commit comments

Comments
 (0)