scifysim.observatory module
- class scifysim.observatory.ObservatoryAltAz(statlocs=None, location=None, verbose=False, multi_dish=True, config=None)[source]
Bases:
observatory
For observatories that are mounted on a single alt-az mount.
- __module__ = 'scifysim.observatory'
- class scifysim.observatory.SpaceObservatory(statlocs=None, location=None, verbose=False, multi_dish=True, config=None)[source]
Bases:
observatory
- __init__(statlocs=None, location=None, verbose=False, multi_dish=True, config=None)[source]
Parameters:
statlocs : The station locations (optional) (east, north) for each aperture shape is (Na, 2)
location : An astropy.coordinatEarthLocation (default = Paranal) example: myloc = astroplan.Observer.at_site(“Paranal”, timezone=”UTC”)
multi_dish : When True, the geometry of the pupil varies depending on the relative position of the target, expecially in terms of projection of the pupil on the plane orthogonal to the line of sight. When False, (not implemented yet) the array is expected to be always facing the line of sight, as is the case for example with a systme like GLINT.
config : A parsed config object.
verbose : Activate verbosity in the log
- __module__ = 'scifysim.observatory'
- get_position(target, time, grid_times_targets=False)[source]
Computes the position of the collectors as a function of time
Arguments :
target : Ignored
time : The time of the observations (astropy.Time) such as found in simulator.sequence
grid_times_target : Ignored
- get_projected_array(taraltaz=None, time=None, PA=None, loc_array=None, c3d=False)[source]
Returns the projected collector array
**Arguments : ** * tarltaz : Ignored * time : (optional) A given time at which to point * PA : (Optional) Ignored * loc_array : (Optional) Overrides the current array
configuration from pointing to use this one instead.
c3d : (optional) When True, returns the array as a
set of 3D vector. When False (default) 2D vectors are given
- get_projected_geometric_pistons()[source]
Computes the distance traveled past the reference plane:
$P_A - A + AM$
- interpolation(t, loc_array=None, full_output=False)[source]
Arguments:
t : time [s]
loc_array : irrelevant hereo
full_output : irrelevant here
returns: * x_A_t [m] The 3D location of the array of apertures
Computes: * x_A_t [m] The 3D location of the array of apertures
- point(time, target=None)[source]
Refreshes the parameters related to pointing and motion
in particular: * self.x_A_t * self.R_rotation when relevant
- scifysim.observatory.basic_z_rotation(theta)[source]
basic rotation matrix around z
Returns: The rotation matrix.
- scifysim.observatory.logit = <Logger scifysim.observatory (WARNING)>
Basic usage:
import kernuller.observatory myobs = kernuller.observatory.observatory(kernuller.VLTI) tarnames = "Spica" targets = [kernuller.observatory.astroplan.FixedTarget.from_name(tar) for tar in tarnames] obstimes = myobs.build_observing_sequence() target_positions = myobs.get_positions(targets[0], obstimes) newarray = myobs.get_projected_array(myobs.get_positions(targets, obstimes)[0,0])
- class scifysim.observatory.observatory(statlocs=None, location=None, verbose=False, multi_dish=True, config=None)[source]
Bases:
object
This class help define the properties of the observatory infrastructure, especially the uv coverage.
- __dict__ = mappingproxy({'__module__': 'scifysim.observatory', '__doc__': '\n This class help define the properties of the observatory infrastructure, especially the uv coverage.\n ', '__init__': <function observatory.__init__>, 'point': <function observatory.point>, 'build_observing_sequence': <function observatory.build_observing_sequence>, 'get_positions': <function observatory.get_positions>, 'get_position': <function observatory.get_position>, 'get_projected_array': <function observatory.get_projected_array>, 'get_projected_geometric_pistons': <function observatory.get_projected_geometric_pistons>, '__dict__': <attribute '__dict__' of 'observatory' objects>, '__weakref__': <attribute '__weakref__' of 'observatory' objects>, '__annotations__': {}})
- __init__(statlocs=None, location=None, verbose=False, multi_dish=True, config=None)[source]
Parameters:
statlocs : The station locations (optional) (east, north) for each aperture shape is (Na, 2)
location : An astropy.coordinatEarthLocation (default = Paranal) example: myloc = astroplan.Observer.at_site(“Paranal”, timezone=”UTC”)
multi_dish : When True, the geometry of the pupil varies depending on the relative position of the target, expecially in terms of projection of the pupil on the plane orthogonal to the line of sight. When False, (not implemented yet) the array is expected to be always facing the line of sight, as is the case for example with a systme like GLINT.
config : A parsed config object.
verbose : Activate verbosity in the log
- __module__ = 'scifysim.observatory'
- __weakref__
list of weak references to the object (if defined)
- build_observing_sequence(times=None, npoints=None, remove_daytime=False)[source]
Parameters:
times : a list of UTC time strings (“2020-04-13T00:00:00”) that define an interval (if npoints is not None), or the complete list of times (if npoints is None)
npoints : The number of samples to take on the interval None means that the times is the whole list
remove_daytime : Whether to remove the points that fall during the day
Returns the series of obstimes needed to compute the altaz positions
- get_position(target, time, grid_times_targets=False)[source]
Parameters:
target: one or a list of of targets
obstimes: one or a list of astropy.Times to make the observations
Returns the
astropy.coordinates.AltAz
for a given target
- get_positions(targets, obstimes)[source]
Deprecated
Parameters:
targets: A list of SkyCoord objects
obstimes: A list of astropy.Times to make the observations
Returns the astropy.coordinates.AltAz for a given target
- get_projected_array(taraltaz=None, PA=True, loc_array=None)[source]
Parameters:
taraltaz : the astropy.coordinates.AltAz of the target
PA : parallactic angle to derotate
loc_array: the array of points to use (None: use self.statlocs)
Returns the new coordinates for the projected array
- get_projected_geometric_pistons(taraltaz=None)[source]
Parameters:
taraltaz : the astropy.coordinates.AltAz of the target
Returns the geomtric piston resutling from the pointing of the array.
- point(obstime, target)[source]
Points the array towards the target, updating its position angle (PA) and altaz (used for airmass). These are later used by other methods to compute the projection of the array.
Parameters:
obstime : The astropy.time.Time object corresponding to the moment of observation (usually picked from the sequence provided by self.build_observing_sequence())
target : The astroplan.FixedTarget object of interest. Usually resolved in the self.build_observign_sequence() routine with astroplan.FixedTarget.from_name()
- scifysim.observatory.test_observatory(tarname='Tau cet', startend=['2020-10-20T00:00:00', '2020-10-20T10:00:00'], nblocs=20)[source]
Runs some test for the core functions of observatory
Parameters:
tarname : The name of the target to use
startend : A list or tuple of two time strings inspressed in UTC matching the format: “2020-10-20T00:00:00”
nblocs : The number of observing blocs to compute