petitRADTRANS.cli.eso_skycalc_cli

Wrapper of ESO’s SKYCALC Command Line Interface.

Module Contents

Functions

find_optimal_airmass_day(ra, dec[, observatory, ...])

get_airmass(ra, dec, mjd[, observatory])

Get the airmass of a sky point at a given date from a given observatory, using ESO's Almanac.

get_optimal_airmass_curve(ra, dec, dit, ...[, ...])

Get the most favourable airmass curve of a sky point from an observation point, using ESO's Almanac.

get_telluric_data([airmass, pwv_mode, season, time, ...])

get_tellurics_npz(file[, wavelength_range, rewrite])

Get telluric transmittance and wavelength from a .npz file.

petitRADTRANS.cli.eso_skycalc_cli.find_optimal_airmass_day(ra, dec, observatory='3060m', time_step=cst.s_cst.day, time_range=cst.s_cst.Julian_year, start_time_mjd=60000.0)
petitRADTRANS.cli.eso_skycalc_cli.get_airmass(ra, dec, mjd, observatory='3060m')

Get the airmass of a sky point at a given date from a given observatory, using ESO’s Almanac.

Args:

ra: (deg) right ascension dec: (deg) declination mjd: (day) modified Julian date observatory: point of observation (“paranal”, “lasilla”, “3060m”)

Returns:

The airmass.

petitRADTRANS.cli.eso_skycalc_cli.get_optimal_airmass_curve(ra, dec, dit, observation_duration, query_dit=120.0, observatory='3060m')

Get the most favourable airmass curve of a sky point from an observation point, using ESO’s Almanac. First, the day of the year at which the target is best observed is searched for. This corresponds to the day at which the airmass of the target at UTC 0 is the lowest. Local time, day and night, the moon position etc. are not taken into account. Then, the lowest airmass of this day is searched for. The dates are adjusted so that the lowest airmass corresponds to the observation mid-time. Finally, the curve is queried from the Almanac at the requested dates around the observation mid-time. The requested dates use the interval query_dit. The queried curve is then interpolated on dates using the requested DIT.

Small query DIT gives more accurate results, but a lot of queries (slow) are necessary.

Args:

ra: (deg) right ascension dec: (deg) declination dit: (s) interval of time between observations observation_duration: (s) total duration of observations query_dit: (s) interval of time between queries observatory: point of observation (“paranal”, “lasilla”, “3060m”)

Returns:

The times (s) to lowest airmass and the corresponding airmasses.

petitRADTRANS.cli.eso_skycalc_cli.get_telluric_data(airmass=1.0, pwv_mode='pwv', season=0, time=0, pwv=3.5, msolflux=130.0, incl_moon='Y', moon_sun_sep=90.0, moon_target_sep=45.0, moon_alt=45.0, moon_earth_dist=1.0, incl_starlight='Y', incl_zodiacal='Y', ecl_lon=135.0, ecl_lat=90.0, incl_loweratm='Y', incl_upperatm='Y', incl_airglow='Y', incl_therm='N', therm_t1=0.0, therm_e1=0.0, therm_t2=0.0, therm_e2=0.0, therm_t3=0.0, therm_e3=0.0, vacair='vac', wmin=300.0, wmax=2000.0, wgrid_mode='fixed_spectral_resolution', wdelta=0.1, wres=1000000, wgrid_user=None, lsf_type='none', lsf_gauss_fwhm=5.0, lsf_boxcar_fwhm=5.0, observatory='3060', temp_flag=0)
petitRADTRANS.cli.eso_skycalc_cli.get_tellurics_npz(file, wavelength_range=None, rewrite=False, **kwargs)

Get telluric transmittance and wavelength from a .npz file. If the file doesn’t exist, a request to the skycalc server is sent to retrieve the data. While all the skycalc information is saved into the file, this function extracts only the wavelengths and transmittances. To prevent issues with large wavelength ranges, the request is split into 2. # TODO splitting could be much smarter (no split for small ranges, multiple splits for very large ones)

Args:

file: file from which to load the telluric transmittance and corresponding wavelengths wavelength_range: (um) list containing the min and max wavelengths rewrite: if True, the file is rewritten even if it already exists **kwargs: get_telluric_data arguments

Returns:

The wavelengths (um) and corresponding telluric transmittances