lcc.entities package¶
Submodules¶
lcc.entities.exceptions module¶
lcc.entities.light_curve module¶
-
class
lcc.entities.light_curve.
LightCurve
(param, meta={})[source]¶ Bases:
object
Attributes
meta (dict) Optional metadata of the light curve. Recommended are these keys: xlabel - name of the first array xlabel_unit - unit of the first array ylabel - name of the second array ylabel_unit - unit of the second array color - filter name of the light curve origin - db name invert_yaxis - True/False if y axis is inverted BAD_VALUES (iterable) List of banned values in light curve Methods
-
BAD_VALUES
= (nan, None, '', '-99', '-99.0')¶
-
DEFAULT_META
= {'xlabel_unit': 'days', 'color': 'N/A', 'xlabel': 'HJD', 'ylabel_unit': 'mag', 'ylabel': 'Magnitudes'}¶
-
getAbbe
(bins=None)[source]¶ Compute Abbe value of the light curve
Parameters: bins : int
Number of bins from original dimension
Returns: float
Abbe value of the light curve
-
getHistogram
(bins=10, centred=True, normed=True)[source]¶ Distribution of magnitudes of light curve
Parameters: bins : int
Number of values in histogram
centred : bool
If True values will be shifted (mean value into the zero)
normed : bool
If True values will be normed (according to standard deviation)
Returns: tuple/None
Tuple of counts and bins (ranges) or None if there are no light curve
-
lcc.entities.star module¶
-
class
lcc.entities.star.
Star
(ident={}, name=None, coo=None, more={}, starClass=None)[source]¶ Bases:
object
Star is base object in astronomy. This class is responsible for keeping basic informations about stellar objects. It’s possible to create empty star and add parameters additionally
Attributes
ident (dict) Dictionary of identifiers of the star. Each key of the dict is name of a database and its value is another dict of database identifiers for the star (e.g. ‘name’) which can be used as an unique identifier for querying the star. For example: ident = {“OgleII” : {“name” : “LMC_SC1_1”, “db_ident” : {“field_num” : 1, “starid” : 1, “target” : “lmc”}, ...} Please keep convention as is shown above. Star is able to be queried again automatically if ident key is name of database connector and it contains dictionary called “db_ident”. This dictionary contains unique query for the star in the database. name (str) Optional name of the star across the all databases coo (astropy.coordinates.sky_coordinate.SkyCoord) Coordinate of the star more (dict) Additional informations about the star in dictionary. This attribute can be considered as a container. These parameters can be then used for filtering. For example it can contains color indexes: more = { “b_mag” : 17.56, “v_mag” : 16.23 } star_class (str) Name of category of the star e.g. ‘cepheid’, ‘RR Lyrae’, etc. light_curves (list) Light curve objects of the star EPS (float) Max distance in degrees to consider two stars equal Methods
-
EPS
= 0.000138¶
-
coo
¶
-
getDistance
(other)[source]¶ Compute distance between this and other star in degrees
Parameters: other : Star object
Another star object to compare with
Returns: astropy.coordinates.angles.Angle
Distance of stars in degrees
-
getIdentName
(db_key=None)[source]¶ Parameters: db_key : str
Database key
Returns: str
Name of the star in given database. If it is not specified, the first database will be taken to construct the name
-
getInRange
(other, eps)[source]¶ This method decides whether other star is in eps range of this star according to coordinates
Parameters: other : Star object
Star to compare with
- eps : float, astropy.unit.quantity.Quantity
Range in degrees
Returns: bool
If in range
-
lightCurve
¶
-
name
¶
-