cogwheel.skyloc_angles.SkyLocAngles¶
- class cogwheel.skyloc_angles.SkyLocAngles(detector_pair: str, tgps: float)¶
Bases:
JSONMixinClass that defines a coordinate system for sky localization.
Converts back and forth between (ra, dec) and (thetanet, phinet). The latter are spherical angles associated to a Cartesian system (i, j, k) where k is the line connecting two detectors, j is the zenith at the midpoint between the two detectors and i = cross(j, k) is the horizon at the midpoint. The coordinate system is specified by two detectors and a GPS time.
- Parameters:
- detector_pairSequence of one or two str
Names of the detectors used to define the coordinate system, e.g. “HL” or “H”.
- tgpsfloat
GPS time used to define the coordinate system.
Methods
Return dictionary with keyword arguments to __init__.
Name of the module that defines the instance's class.
Transform sky location angles from (ra, dec) to (thetanet, phinet).
Return a new instance of the class, possibly updating init_kwargs.
Transform sky location angles from (thetanet, phinet) to (ra, dec).
Write class instance to json file.
Attributes
subclass_registry- get_init_dict(**kwargs)¶
Return dictionary with keyword arguments to __init__.
Only works if the class stores its init parameters as attributes with the same names. Otherwise, the subclass should override this method.
- Parameters:
- **kwargs
Allows to manually override some keys. The remaining ones will be read from the instance’s attributes. All keywords must be in the __init__ signature. It’s mostly here to facilitate overriding by subclasses.
- get_module_name()¶
Name of the module that defines the instance’s class.
- radec_to_thetaphinet(ra, dec)¶
Transform sky location angles from (ra, dec) to (thetanet, phinet).
- reinstantiate(**new_init_kwargs)¶
Return a new instance of the class, possibly updating init_kwargs.
Values not passed will be taken from the current instance.
- thetaphinet_to_radec(thetanet, phinet)¶
Transform sky location angles from (thetanet, phinet) to (ra, dec).
- to_json(dirname, basename=None, *, dir_permissions=493, file_permissions=420, overwrite=False)¶
Write class instance to json file.
It can then be loaded with read_json.