skycalc_ipy.core module#
Based on the skycalc_cli package, but heavily modified.
The original code was taken from skycalc_cli
version 1.1.
Credit for skycalc_cli
goes to ESO
- class skycalc_ipy.core.AlmanacQuery(indic)[source]#
Bases:
ESOQueryBase
A class for querying the SkyCalc Almanac.
- Parameters
- indicdict, SkyCalcParams
A dictionary / :class:
SkyCalcParams
object containing the following keywords:ra
,dec
,date
ormjd
ra
: [deg] a float in the range [0, 360]dec
: [deg] a float in the range [-90, 90]
And either
data
ormjd
:date
: a datetime string in the format ‘yyyy-mm-ddThh:mm:ss’mjd
a float with the modified julian date. Note thatmjd=0
corresponds to the date “1858-11-17”
Methods
__call__
()Query the ESO Skycalc server with the parameters in self.params.
get_cache_filenames
(prefix, suffix)Produce filename from hass of parameters.
query
()Deprecated feature.
- class skycalc_ipy.core.ESOQueryBase(url, params)[source]#
Bases:
object
Base class for queries to ESO skycalc server.
Methods
get_cache_filenames
(prefix, suffix)Produce filename from hass of parameters.
- BASE_URL = 'https://etimecalret-002.eso.org/observing/etc'#
- REQUEST_TIMEOUT = 2#
- class skycalc_ipy.core.SkyModel[source]#
Bases:
ESOQueryBase
Class for querying the Advanced SkyModel at ESO.
Contains all the parameters needed for querying the ESO SkyCalc server. The parameters are contained in
params
and the returned FITS file is indata
in binary form. This must be saved to disk before it can be read with thewrite()
method.Parameter and their default values and comments can be found at: https://www.eso.org/observing/etc/bin/gen/form?INS.MODE=swspectr+INS.NAME=SKYCALC
Methods
__call__
(**kwargs)Send server request.
call
()Deprecated feature.
callwith
(newparams)Deprecated feature.
Convert the human readable observatory name into its ESO ID number.
get_cache_filenames
(prefix, suffix)Produce filename from hass of parameters.
getdata
()Deprecated feature.
printparams
([keys])List the values of all, or a subset, of parameters.
write
(local_filename, **kwargs)Write data to file.
- call()[source]#
Deprecated feature.
Deprecated since version v0.4.0.
This method is deprecated, just call the instance instead.
- callwith(newparams)[source]#
Deprecated feature.
Deprecated since version v0.4.0.
This method is deprecated, just call the instance instead.
- fix_observatory()[source]#
Convert the human readable observatory name into its ESO ID number.
The following observatory names are accepted:
lasilla
,paranal
,armazones
or3060m
,highanddry
or5000m
- getdata()[source]#
Deprecated feature.
Deprecated since version v0.4.0.
This method is deprecated, just use the .data attribute instead.