StarCatalog¶
- class sonic.StarCatalog¶
- Constructor Summary
- StarCatalog()¶
Constructor for StarCatalog object. Note that StarCatalog is an abstract class, so it is not possible to directly instantiate this object. Instead, this constructor is intended for implicit use by any subclasses, such that they’ll all be able to have access to constellation data.
- Inputs:
None.
- Outputs:
obj (1x1 concrete subclass of sonic.StarCatalog): As this will be implicitly called by any subclass of StarCatalog, this will be an instance of that subclass type, containing constellation data.
Last revised: 3/29/24 Last author: Michael Krause
- Property Summary
- const_data¶
- dec_RAD¶
- filter_map¶
- n¶
- plx_RAD¶
- pm_dec_RPS¶
- pm_ra_RPS¶
- ra_RAD¶
- t_epoch¶
- Method Summary
- checkInSphericalPolygon(targ_pt, const_idx)¶
Given a particular point and a spherical polygon (encoded as a series of unit vectors specifying vertices of the polygon), this checks if the point is in the spherical polygon. Note that this method implicitly assumes that each spherical polygon subtends less than 180 degrees on the celestial sphere.
- Inputs:
obj (1x1 concrete subclass of sonic.StarCatalog): object containing constellation data.
targ_pt (1x1 sonic.Points3): Unit vector specifying the query point.
const_idx (1x1 double): Index into the constellation data (contained within obj), yielding information on the spherical polygon we’re attempting to test.
- Outputs:
isInPolygon (1x1 logical): True if point lies within spherical polygon, false otherwise.
Last revised: 3/29/24 Last author: Michael Krause
- eval(et, r_obs_AU)¶
Evaluate a star catalog per the 5-parameter standard model.
- Inputs:
obj (sonic.StarCatalog): Star catalog object
et (1x1 double): Epoch at which to evaluate the catalog, in TDB (consistent with SPICE ephemeris time)
r_obs_AU (3x1 double): The position of the observer in ICRF, in astronomical units (AU).
- Outputs:
u (1x1 sonic.PointsS2): The resultant star unit vectors, packed into a PointsS2 object.
Last revised: 2/14/24 Last author: Michael Krause
- filter(filt_vec)¶
Filter the catalog based on the supplied binary vector, which can be arbitrarily crafted.
- Inputs:
obj (sonic.StarCatalog): Star catalog object
filt_vec (1xm double): Vector of indices to filter to (where m will be the size of the resultant catalog), OR a logical vector of size n, with m true values, where only those marked true will be retained by the filter.
- Outputs:
filtered_cat (sonic.StarCatalog): Filtered star catalog catalog object, with n corresponding to the number of true found in bin_vec.
Last revised: 10/30/24 Last author: Ava Thrasher
- findNearestConstCands(targ_pt)¶
Given a set of spherical polygons, each with a known point lying inside of the polygon, this method takes the dot product between our query point and each known point. These dot products are sorted, and polygons with the largest dot products (i.e., those whose known points lie “close” to the query points, in the angular sense), are checked first. This significantly accelerates the constellation matching algorithm.
- Inputs:
obj (1x1 concrete subclass of sonic.StarCatalog): object containing constellation data.
targ_pt (1x1 sonic.Points3): Unit vector specifying the query point.
- Outputs:
sort_mapping (1xm double): Given that obj contains information on n constellations, this returns the indices of the closest m constellations ordered such that the dot products corresponding to each index are in descending order. Note that m < n, where m is the number of constellations where the dot product with the query point is positive.
Last revised: 3/29/24 Last author: Michael Krause
- static parseConstFile(const_file)¶
Parses an individual IAU constellation boundary file to yield the boundary list.
- Inputs:
const_file (char): constellation boundary filename
- Outputs:
const_bounds (2xn double): List of n RA/DEC (in degrees) boundary points
Last revised: 2/14/24 Last author: Michael Krause
- static parseConstellationFiles(const_dir)¶
The IAU provides files delineating constellation boundaries. This function grabs those files, parses them, and outputs a struct with each constellation’s boundaries.
The saved file contains a struct array containing 89 entries, each with a name and 2-by-n list of RA/DEC vertices defining the boundary of that constellation. Note that while there are 88 constellations, Serpens is split into two distinct parts.
- Inputs:
const_dir (char): directory where IAU constellation files live
Last revised: 2/14/24 Last author: Michael Krause
- raDecToConstellation(ra_RAD, dec_RAD)¶
Given a particular right ascension and declination on the celestial sphere, this will return a char array indicating the constellation that this point lies within. If, for whatever reason, no match is found, an empty char array is returned.
- Inputs:
obj (1x1 concrete subclass of sonic.StarCatalog): object containing constellation data.
ra_RAD (1x1 double): Right ascension to query, in radians.
dec_RAD (1x1 double): Declination to query, in radians.
- Outputs:
const (1x1 char array): Name of resultant constellation, where the point specified by (ra_RAD, dec_RAD) lies.
Last revised: 3/29/24 Last author: Michael Krause