lsst.sims.maf.stackers package¶
Submodules¶
lsst.sims.maf.stackers.NEODistStacker module¶
-
class
lsst.sims.maf.stackers.NEODistStacker.
NEODistStacker
(stepsize=0.001, maxDist=3.0, minDist=0.3, H=22, elongCol='solarElong', filterCol='filter', sunAzCol='sunAz', azCol='azimuth', m5Col='fiveSigmaDepth')[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
For each observation, find the max distance to a ~144 km NEO, also stack on the x,y position of the object.
-
colsAdded
¶
-
lsst.sims.maf.stackers.baseStacker module¶
-
class
lsst.sims.maf.stackers.baseStacker.
StackerRegistry
(name, bases, dict)[source]¶ Bases:
type
Meta class for Stackers, to build a registry of stacker classes.
-
class
lsst.sims.maf.stackers.baseStacker.
BaseStacker
[source]¶ Bases:
object
Base MAF Stacker: add columns generated at run-time to the simdata array.
-
colsAdded
¶
-
registry
¶
-
run
(simData, override=False)[source]¶ Example: Generate the new stacker columns, given the simdata columns from the database. Returns the new simdata structured array that includes the new stacker columns.
-
sourceDict
¶
-
lsst.sims.maf.stackers.coordStackers module¶
-
lsst.sims.maf.stackers.coordStackers.
mjd2djd
(mjd)[source]¶ Convert MJD to the Dublin Julian date used by ephem.
Parameters: mjd (float or numpy.ndarray) – The modified julian date. Returns: The dublin julian date. Return type: float or numpy.ndarray
-
lsst.sims.maf.stackers.coordStackers.
raDec2AltAz
(ra, dec, lat, lon, mjd, altonly=False)[source]¶ Convert RA/Dec (and telescope site lat/lon) to alt/az.
This uses simple equations and ignores aberation, precession, nutation, etc.
Parameters: Returns: - alt (numpy.array) – Altitude, same length as ra and dec. Radians.
- az (numpy.array) – Azimuth, same length as ra and dec. Radians.
-
class
lsst.sims.maf.stackers.coordStackers.
GalacticStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the galactic coordinates of each RA/Dec pointing: gall, galb
Parameters: -
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.coordStackers.
EclipticStacker
(mjdCol='observationStartMJD', raCol='fieldRA', decCol='fieldDec', degrees=True, subtractSunLon=False)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the ecliptic coordinates of each RA/Dec pointing: eclipLat, eclipLon Optionally subtract off the sun’s ecliptic longitude and wrap.
Parameters: -
colsAdded
¶
-
lsst.sims.maf.stackers.ditherStackers module¶
-
lsst.sims.maf.stackers.ditherStackers.
setupDitherStackers
(raCol, decCol, degrees, **kwargs)[source]¶
-
lsst.sims.maf.stackers.ditherStackers.
wrapRADec
(ra, dec)[source]¶ Wrap RA into 0-2pi and Dec into +/0 pi/2.
Parameters: - ra (numpy.ndarray) – RA in radians
- dec (numpy.ndarray) – Dec in radians
Returns: Wrapped RA/Dec values, in radians.
Return type: numpy.ndarray, numpy.ndarray
-
lsst.sims.maf.stackers.ditherStackers.
wrapRA
(ra)[source]¶ Wrap only RA values into 0-2pi (using mod).
Parameters: ra (numpy.ndarray) – RA in radians Returns: Wrapped RA values, in radians. Return type: numpy.ndarray
-
lsst.sims.maf.stackers.ditherStackers.
inHexagon
(xOff, yOff, maxDither)[source]¶ Identify dither offsets which fall within the inscribed hexagon.
Parameters: - xOff (numpy.ndarray) – The x values of the dither offsets.
- yoff (numpy.ndarray) – The y values of the dither offsets.
- maxDither (float) – The maximum dither offset.
Returns: Indexes of the offsets which are within the hexagon inscribed inside the ‘maxDither’ radius circle.
Return type: numpy.ndarray
-
lsst.sims.maf.stackers.ditherStackers.
polygonCoords
(nside, radius, rotationAngle)[source]¶ Find the x,y coords of a polygon.
This is useful for plotting dither points and showing they lie within a given shape.
Parameters: Returns: List of x/y coordinates of the points describing the polygon.
Return type:
-
class
lsst.sims.maf.stackers.ditherStackers.
BaseDitherStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, maxDither=1.75, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Base class for dither stackers.
The base class just adds an easy way to define a stacker as one of the ‘dither’ types of stackers. These run first, before any other stackers.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
RandomDitherFieldPerVisitStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, maxDither=1.75, inHex=True, randomSeed=None)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.BaseDitherStacker
Randomly dither the RA and Dec pointings up to maxDither degrees from center, with a different offset for each field, for each visit.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
- randomSeed (int, optional) – If set, then used as the random seed for the numpy random number generation for the dither offsets. Default None.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
RandomDitherFieldPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', nightCol='night', maxDither=1.75, inHex=True, randomSeed=None)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.RandomDitherFieldPerVisitStacker
Randomly dither the RA and Dec pointings up to maxDither degrees from center, one dither offset per new night of observation of a field. e.g. visits within the same night, to the same field, have the same offset.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
- randomSeed (int, optional) – If set, then used as the random seed for the numpy random number generation for the dither offsets. Default None.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
RandomDitherPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, nightCol='night', maxDither=1.75, inHex=True, randomSeed=None)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.RandomDitherFieldPerVisitStacker
Randomly dither the RA and Dec pointings up to maxDither degrees from center, one dither offset per night. All fields observed within the same night get the same offset.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
- randomSeed (int, optional) – If set, then used as the random seed for the numpy random number generation for the dither offsets. Default None.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
SpiralDitherFieldPerVisitStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', numPoints=60, maxDither=1.75, nCoils=5, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.BaseDitherStacker
Offset along an equidistant spiral with numPoints, out to a maximum radius of maxDither. Each visit to a field receives a new, sequential offset.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- numPoints (int, optional) – The number of points in the spiral. Default 60.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- nCoils (int, optional) – The number of coils the spiral should have. Default 5.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
SpiralDitherFieldPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', nightCol='night', numPoints=60, maxDither=1.75, nCoils=5, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.SpiralDitherFieldPerVisitStacker
Offset along an equidistant spiral with numPoints, out to a maximum radius of maxDither. Each field steps along a sequential series of offsets, each night it is observed.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- numPoints (int, optional) – The number of points in the spiral. Default 60.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- nCoils (int, optional) – The number of coils the spiral should have. Default 5.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
SpiralDitherPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', nightCol='night', numPoints=60, maxDither=1.75, nCoils=5, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.SpiralDitherFieldPerVisitStacker
Offset along an equidistant spiral with numPoints, out to a maximum radius of maxDither. All fields observed in the same night receive the same sequential offset, changing per night.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- numPoints (int, optional) – The number of points in the spiral. Default 60.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- nCoils (int, optional) – The number of coils the spiral should have. Default 5.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
HexDitherFieldPerVisitStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', maxDither=1.75, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.BaseDitherStacker
Use offsets from the hexagonal grid of ‘hexdither’, but visit each vertex sequentially. Sequential offset for each visit.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
HexDitherFieldPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', nightCol='night', maxDither=1.75, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.HexDitherFieldPerVisitStacker
Use offsets from the hexagonal grid of ‘hexdither’, but visit each vertex sequentially. Sequential offset for each night of visits.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
HexDitherPerNightStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, fieldIdCol='fieldId', nightCol='night', maxDither=1.75, inHex=True)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.HexDitherFieldPerVisitStacker
Use offsets from the hexagonal grid of ‘hexdither’, but visit each vertex sequentially. Sequential offset per night for all fields.
Parameters: - raCol (str, optional) – The name of the RA column in the data. Default ‘fieldRA’.
- decCol (str, optional) – The name of the Dec column in the data. Default ‘fieldDec’.
- degrees (bool, optional) – Flag whether RA/Dec should be treated as (and kept as) degrees.
- fieldIdCol (str, optional) – The name of the fieldId column in the data. Used to identify fields which should be identified as the ‘same’. Default ‘fieldId’.
- nightCol (str, optional) – The name of the night column in the data. Default ‘night’.
- maxDither (float, optional) – The radius of the maximum dither offset, in degrees. Default 1.75 degrees.
- inHex (bool, optional) – If True, offsets are constrained to lie within a hexagon inscribed within the maxDither circle. If False, offsets can lie anywhere out to the edges of the maxDither circle. Default True.
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.ditherStackers.
RandomRotDitherPerFilterChangeStacker
(rotTelCol='rotTelPos', filterCol='filter', degrees=True, maxDither=90.0, maxRotAngle=90, minRotAngle=-90, randomSeed=None)[source]¶ Bases:
lsst.sims.maf.stackers.ditherStackers.BaseDitherStacker
Randomly dither the physical angle of the telescope rotator wrt the mount, after every filter change.
Parameters: - rotTelCol (str, optional) – The name of the column in the data specifying the physical angle of the telescope rotator wrt. the mount. Default: ‘rotTelPos’.
- filterCol (str, optional) – The name of the filter column in the data. Default: ‘filter’.
- degrees (boolean, optional) – True if angles in the database are in degrees (default). If True, returned dithered values are in degrees also. If False, angles assumed to be in radians and returned in radians.
- maxDither (float, optional) – Abs(maximum) rotational dither, in degrees. The dithers then will be between -maxDither to maxDither. Default: 90 degrees.
- maxRotAngle (float, optional) – Maximum rotator angle possible for the camera. Default 90 degrees.
- minRotAngle (float, optional) – Minimum rotator angle possible for the camera. Default -90 degrees.
- randomSeed (int, optional) – If set, then used as the random seed for the numpy random number generation for the dither offsets. Default: None.
-
colsAdded
¶
lsst.sims.maf.stackers.generalStackers module¶
-
class
lsst.sims.maf.stackers.generalStackers.
NormAirmassStacker
(airmassCol='airmass', decCol='fieldDec', degrees=True, telescope_lat=-30.2446388)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Calculate the normalized airmass for each opsim pointing.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
ParallaxFactorStacker
(raCol='fieldRA', decCol='fieldDec', dateCol='observationStartMJD', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Calculate the parallax factors for each opsim pointing. Output parallax factor in arcseconds.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
HourAngleStacker
(lstCol='observationStartLST', raCol='fieldRA', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the Hour Angle for each observation. Always in HOURS.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
FilterColorStacker
(filterCol='filter')[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Translate filters (‘u’, ‘g’, ‘r’ ..) into RGB tuples.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
ZenithDistStacker
(altCol='altitude', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Calculate the zenith distance for each pointing. If ‘degrees’ is True, then assumes altCol is in degrees and returns degrees. If ‘degrees’ is False, assumes altCol is in radians and returns radians.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
ParallacticAngleStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True, mjdCol='observationStartMJD', lstCol='observationStartLST', site='LSST')[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the parallactic angle to each visit. If ‘degrees’ is True, this will be in degrees (as are all other angles). If False, then in radians.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
SeasonStacker
(mjdCol='observationStartMJD', RACol='fieldRA', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add an integer label to show which season a given visit is in.
The season only depends on the RA of the object: we compute the MJD when each object is on the meridian at midnight, and subtract 6 months to get the start date of each season. The season index range is 0-10. Must wrap 0th and 10th to get a total of 10 seasons.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
DcrStacker
(filterCol='filter', altCol='altitude', degrees=True, raCol='fieldRA', decCol='fieldDec', lstCol='observationStartLST', site='LSST', mjdCol='observationStartMJD', dcr_magnitudes=None)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Calculate the RA,Dec offset expected for an object due to differential chromatic refraction.
For DCR calculation, we also need zenithDistance, HA, and PA – but these will be explicitly handled within this stacker so that setup is consistent and they run in order. If those values have already been calculated elsewhere, they will not be overwritten.
Parameters: - filterCol (str) – The name of the column with filter names. Default ‘fitler’.
- altCol (str) – Name of the column with altitude info. Default ‘altitude’.
- raCol (str) – Name of the column with RA. Default ‘fieldRA’.
- decCol (str) – Name of the column with Dec. Default ‘fieldDec’.
- lstCol (str) – Name of the column with local sidereal time. Default ‘observationStartLST’.
- site (str or lsst.sims.utils.Site) – Name of the observory or a lsst.sims.utils.Site object. Default ‘LSST’.
- mjdCol (str) – Name of column with modified julian date. Default ‘observationStartMJD’
- dcr_magnitudes (dict) – Magitude of the DCR offset for each filter at altitude/zenith distance of 45 degrees. Defaults u=0.07, g=0.07, r=0.50, i=0.045, z=0.042, y=0.04 (all arcseconds).
Returns: Returns array with additional columns ‘ra_dcr_amp’ and ‘dec_dcr_amp’ with the DCR offsets for each observation. Also runs ZenithDistStacker and ParallacticAngleStacker.
Return type: numpy.array
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.generalStackers.
FiveSigmaStacker
(airmassCol='airmass', seeingCol='seeingFwhmEff', skybrightnessCol='skyBrightness', filterCol='filter', exptimeCol='visitExposureTime')[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Calculate the 5-sigma limiting depth for a point source in the given conditions.
This is generally not needed, unless the m5 parameters have been updated or m5 was not previously calculated.
-
colsAdded
¶
-
-
class
lsst.sims.maf.stackers.generalStackers.
OpSimFieldStacker
(raCol='fieldRA', decCol='fieldDec', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the fieldId of the closest OpSim field for each RA/Dec pointing.
Parameters: -
colsAdded
¶
-
lsst.sims.maf.stackers.getColInfo module¶
-
class
lsst.sims.maf.stackers.getColInfo.
ColInfo
[source]¶ Bases:
object
Class to hold the unit and source locations for columns.
The stacker classes which will generate stacker columns are tracked here, as well as some default units for common opsim columns.
Inspect ColInfo.unitDict for more information.
-
getDataSource
(colName)[source]¶ Identify the appropriate source for a given column.
For values which are calculated via a stacker, the returned value is the stacker class. For values which do not have a recorded source or are known to be coming from the database, the result is self.defaultDataSource (None), which will be assumed to be queryable from the database.
Parameters: colName (str) – The name of the column. Returns: Return type: lsst.sims.maf.stacker or None
-
lsst.sims.maf.stackers.m5OptimalStacker module¶
-
class
lsst.sims.maf.stackers.m5OptimalStacker.
M5OptimalStacker
(airmassCol='airmass', decCol='dec_rad', skyBrightCol='filtSkyBrightness', seeingCol='FWHMeff', filterCol='filter', moonAltCol='moonAlt', sunAltCol='sunAlt', site='LSST')[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Make a new m5 column as if observations were taken on the meridian. If the moon is up, assume sky brightness stays the same.
Assumes seeing scales as airmass^0.6. Uses linear fits for sky and airmass relation.
Parameters: - airmassCol (str ('airmass')) – Column name for the airmass per pointing.
- decCol (str ('dec_rad')) – Column name for the pointing declination.
- skyBrightCol (str ('filtSkyBrightness')) – Column name for the sky brighntess per pointing.
- filterCol (str ('filter')) – Column name for the filter name.
- m5Col (str ('fiveSigmaDepth')) – Colum name for the five sigma limiting depth per pointing.
- moonAltCol (str ('moonAlt')) – Column name for the moon altitude per pointing.
- sunAltCol (str ('sunAltCol')) – Column name for the sun altitude column.
- site (str ('LSST')) – Name of the site.
Returns: Adds a column to that is approximately what the five-sigma depth would have been if the observation had been taken on the meridian.
Return type: numpy.array
-
colsAdded
¶
lsst.sims.maf.stackers.moStackers module¶
-
class
lsst.sims.maf.stackers.moStackers.
BaseMoStacker
[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Base class for moving object (SSobject) stackers. Relevant for MoSlicer ssObs (pd.dataframe).
Provided to add moving-object specific API for ‘run’ method of moving object stackers.
-
class
lsst.sims.maf.stackers.moStackers.
MoMagStacker
(vMagCol='magV', colorCol='dmagColor', magFilterCol='magFilter', lossCol='dmagDetect', m5Col='fiveSigmaDepth', gamma=0.038, sigma=0.12)[source]¶ Bases:
lsst.sims.maf.stackers.moStackers.BaseMoStacker
Add columns relevant to SSobject apparent magnitudes and visibility to the slicer ssoObs dataframe, given a particular Href and current Hval.
Specifically, this stacker adds magLimit, appMag, SNR, and vis. magLimit indicates the appropriate limiting magnitude to consider for a particular object in a particular observation, when combined with the losses due to detection (dmagDetect) or trailing (dmagTrail). appMag adds the apparent magnitude in the filter of the current object, at the current Hval. SNR adds the SNR of this object, given the magLimit. vis adds a flag (0/1) indicating whether an object was visible (assuming a 5sigma threshhold including some probabilistic determination of visibility).
Parameters: - magFilterCol (str, opt) – Name of the column describing the magnitude of the object, in the visit filter. Default magFilter.
- m5Col (str, opt) – Name of the column describing the 5 sigma depth of each visit. Default fiveSigmaDepth.
- lossCol (str, opt) – Name of the column describing the magnitude losses, due to trailing (dmagTrail) or detection (dmagDetect). Default dmagDetect.
- gamma (float, opt) – The ‘gamma’ value for calculating SNR. Default 0.038. LSST range under normal conditions is about 0.037 to 0.039.
- sigma (float, opt) – The ‘sigma’ value for probabilistic prediction of whether or not an object is visible at 5sigma. Default 0.12. The probabilistic prediction of visibility is based on Fermi-Dirac completeness formula (see SDSS, eqn 24, Stripe82 analysis: http://iopscience.iop.org/0004-637X/794/2/120/pdf/apj_794_2_120.pdf).
-
colsAdded
¶
-
class
lsst.sims.maf.stackers.moStackers.
EclStacker
(raCol='ra', decCol='dec', inDeg=True)[source]¶ Bases:
lsst.sims.maf.stackers.moStackers.BaseMoStacker
Add ecliptic latitude/longitude (ecLat/ecLon) to the slicer ssoObs (in degrees).
Parameters: -
colsAdded
¶
-
lsst.sims.maf.stackers.nFollowStacker module¶
-
lsst.sims.maf.stackers.nFollowStacker.
findTelescopes
(minSize=3.0)[source]¶ Finds telescopes larger than minSize, from list of large telescopes based on http://astro.nineplanets.org/bigeyes.html.
Returns: Array of large telescopes with columns [aperture, name, lat, lon]. Return type: np.recarray
-
class
lsst.sims.maf.stackers.nFollowStacker.
NFollowStacker
(minSize=3.0, airmassLimit=2.5, timeSteps=array([ 0.5, 3.5, 6.5, 9.5]), mjdCol='observationStartMJD', raCol='fieldRA', decCol='fieldDec', degrees=True)[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
Add the number of telescopes (‘nObservatories’) that could follow up any visit at (any of the) times in timeStep, specifying the minimum telescope size (in meters) and airmass limit.
Parameters: - minSize (float, opt) – The minimum telescope aperture to use, in meters. Default 3.0.
- airmassLimit (float, opt) – The maximum airmass allowable at the follow-up observatory. Default 2.5.
- timeSteps (np.array or list of floats, opt) – The timesteps to check for followup opportunities, in hours. Default is np.arange(0.5, 12., 3.0).
- mjdCol (str, opt) – The exposure MJD column name. Default ‘observationStartMJD’.
- raCol (str, opt) – The RA column name. Default ‘fieldRA’.
- decCol (str, opt) – The Dec column name. Default ‘fieldDec’.
- raDecDeg (bool, opt) – Flag whether RA/Dec are in degrees (True) or radians (False).
-
colsAdded
¶
lsst.sims.maf.stackers.sdssStackers module¶
-
class
lsst.sims.maf.stackers.sdssStackers.
SdssRADecStacker
(pcols=['p1', 'p2', 'p3', 'p4', 'p5', 'p6', 'p7', 'p8'])[source]¶ Bases:
lsst.sims.maf.stackers.baseStacker.BaseStacker
convert the p1,p2,p3… columns to radians and wrap them
-
colsAdded
¶
-