Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/scope/calc_quantities.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,14 @@ def calc_snr(param, args, data):
data["P_rot"] * (data["phase_end"] - data["phase_start"]) * 24 * 3600
) # in seconds
exptime = duration / n_exposures - detector_reset_time
teff = data["Teff_star"]
logg = data["logg_star"]
# ok this is pretty good lol

if instrument == "IGRINS":
snr = scrape_igrins_etc(kmag, exptime)
elif instrument == "CRIRES+":
snr = scrape_crires_plus_etc(kmag, exptime)
snr = scrape_crires_plus_etc(kmag, teff, logg, exptime)
else:
logger.error(f"Unknown instrument {instrument}!")
# need to construct a JSON object to send to the CRRIES+ SNR calculator.
Expand Down
8 changes: 5 additions & 3 deletions src/scope/input.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
#·······································:
Created: 2024-08-15
Author: Arjun Savel!
Planet name: WASP-76 b
Planet name: WASP-166 b

# Simulation setup

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

Expand All @@ -33,6 +33,8 @@ b DATABASE # impact parameter of the planet's orbi
Rstar DATABASE # stellar radius, in solar radii. [DB]
Mstar DATABASE # stellar mass, in solar masses. [DB]
Kmag DATABASE # K-band magnitude of the star. [DB]
Teff_star DATABASE # effective temperature of the star, in K. [DB]
logg_star DATABASE # surface gravity of the star, in cm/s^2. [DB]
kp 128.1 # expected planetary orbital velocity assuming circular orbit, in km/s. input NULL if you'd like to calculate from orbital parameters.
v_sys 0.0 # systemic velocity, in km/s. [DB]
v_rot NULL # equatorial rotational velocity. input NULL if you'd like to calculate from orbital parameters.
Expand All @@ -48,7 +50,7 @@ lambda_misalign 0 # misalignment angle of the planet's or
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.

# Instrument Parameters
instrument IGRINS # name of the spectrograph to simulate. currently spectrographs are ``IGRINS`` and ``CRIRES+``.
instrument CRIRES+ # name of the spectrograph to simulate. currently spectrographs are ``IGRINS`` and ``CRIRES+``.
blaze True # whether to include a blaze function or not.
wav_error False # whether to include wavelength solution errors or not.
order_dep_throughput True # whether to include order-dependent throughput variations.
Expand Down
4 changes: 4 additions & 0 deletions src/scope/input_output.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ def __init__(self, message="scope input file error:"):
"v_rot_star": "st_vsin",
"b": "pl_imppar",
"Kmag": "sy_kmag",
"Teff_star": "st_teff",
"logg_star": "st_logg",
}


Expand Down Expand Up @@ -215,6 +217,8 @@ def parse_input_file(
"Mp",
"peri",
"Kmag",
"Teff_star",
"logg_star",
]

# Convert values to appropriate types
Expand Down
Loading