rubin_sim¶
Python API¶
rubin_sim.utils api¶
rubin_sim.utils Package¶
Functions¶
|
Convert RA, Dec, longitude, latitude and MJD into altitude, azimuth and parallactic angle using PALPY |
|
Angular separation between two points in degrees |
|
Convert the mean position (RA, Dec) in the International Celestial Reference System (ICRS) to the mean apparent geocentric position |
|
Convert observed (RA, Dec) to apparent geocentric (RA, Dec). |
|
apply_precession() applies precesion and nutation to coordinates between two epochs. |
|
Applies proper motion between two epochs. |
|
Calculted refracted Zenith Distance |
|
Convert alt, az to RA, Dec without taking into account aberration, precession, diffraction, etc. |
|
A fast calculation of parallactic angle |
|
Convert Ra,Dec to Altitude and Azimuth. |
|
Convert an angle in degrees to arcseconds |
|
Convert an angle in radians to arcseconds |
|
Bearing between two points all radians |
|
Compute Greenwich mean sidereal time and Greenwich apparent sidereal time see: From http://aa.usno.navy.mil/faq/docs/GAST.php |
|
calculates local mean sidereal time and local apparent sidereal time |
|
Calculate the 'season' in the survey for a series of ra/time values of an observation. |
|
Transforms between spherical and Cartesian coordinates. |
Return the DDF locations as as dict. |
|
|
Convert an angle in arcseconds to degrees |
|
Destination lat and lon given a distance, bearing and starting position all radians |
|
Calculate the distance from an (ra, dec) point to the Sun (in degrees). |
The equation of equinoxes. |
|
|
Convert Galactic Coordinates to RA, dec (J2000) |
|
Find the htmid (the unique integer identifying each trixel) of the trixel containing a given RA, Dec pair. |
|
Convert RA,Dec (J2000) to Galactic Coordinates |
|
Return a dict of all of the trixels up to a given mesh level. |
|
Return the path to a package |
|
@param [in] ra is the RA in degrees. |
|
@param [in] ra is RA in degrees. |
|
Calculate RA/dec on sky of object with x/y and RA/Cen of field of view. |
|
Calculate x/y projection of ra1/dec1 in system with center at r_acen, deccen. |
|
Return a Half Space defined by two points on a Great Circle and a third point contained in the Half Space. |
|
Take an RA, Dec and radius of a circular field of view and return a HalfSpace |
|
DEPRECATED; use angular_separation() instead |
|
Take arrays of ra's, dec's, and value and bin into healpixels. |
|
Find the maximum of a healpix map, then orders healpixels by selecting the maximum bordering the selected area. |
|
Correct for healpy being silly and running dec from 0-180. |
|
Convert the apparent geocentric position in (RA, Dec) to the mean position in the International Celestial Reference System (ICRS) |
|
Convert observed RA, Dec into mean International Celestial Reference Frame (ICRS) RA, Dec. |
|
Like scipy.binned_statistic, but for unique integer ids. |
|
|
|
Find the level of a trixel from its htmid. |
|
Calculate the m5 value, using photometric scaling. |
|
Return m5 (scaled) value for all filters. |
|
Convert a Multi-Order Coverage Map to a single nside HEALPix array. |
|
Convert the RA and Dec of a star into `native' longitude and latitude. |
|
Convert apparent geocentric (RA, Dec) to observed (RA, Dec). |
|
Convert mean position (RA, Dec) in the International Celestial Reference Frame to observed (RA, Dec). |
|
Convert pupil coordinates into observed (RA, Dec) |
|
All radians points 1 and 2 define an arc segment, this finds the distance of point 3 to the arc segment. |
|
Take an input RA and dec from the sky and convert it to coordinates on the focal plane. |
|
Assign ra,dec points to the correct healpixel. |
|
Convert altitude and azimuth to RA and Dec |
|
Transform a star's position in native longitude and latitude into RA and Dec. |
|
@param [in] x_pupil -- pupil coordinates in radians. |
|
Utility to convert x,y,z Cartesian coordinates to RA, dec positions in space. |
|
Convert an angle in arcseconds to radians |
|
Calculate the refraction using PAL's refco routine |
|
Rotate a Cartesian vector an angle theta about the x axis. |
|
Rotate a Cartesian vector an angle theta about the y axis. |
|
Rotate a Cartesian vector an angle theta about the z axis. |
|
Given two vectors v1,v2 calculate the rotation matrix for v1->v2 using the axis-angle approach |
|
Uniformly distributes samples on a patch on a sphere between phi pm delta, and theta pm delta on a sphere. |
|
Return the RA and Dec of the Sun in degrees |
|
Sample a square patch on the sphere overlapping obsmetadata field of view by picking the area enclosed in obsmetadata.pointing_ra pm obsmetadata.bound_length obsmetadata.pointing_dec pm obsmetadata.bound_length |
Transforms between Cartesian and spherical coordinates |
|
|
Calculates the expected magnitudes in LSST filters for a typical star of the given spectral type. |
A place to store the expected MJD start time of the survey. |
|
|
Return the trixel corresponding to the given htmid (htmid is the unique integer identifying each trixel). |
|
Just make RA, dec points on a sphere |
|
Convert an angular radius into a physical radius for a kdtree search. |
|
Utility to convert RA,dec positions in x,y,z space. |
Classes¶
|
|
|
|
|
HalfSpaces are circles on the unit sphere defined by intersecting a plane with the unit sphere. |
|
Identify point on the sky within an LSST camera footprint. |
A sub-class of Warning. |
|
|
|
|
Track metadata for a given telescope pointing. |
|
This class will store site information for use in Catalog objects. |
|
Classes inheriting from this class define spatial bounds on the objects contained within a catalog. |
|
|
Object to store values calculated in sys-eng |
|
|
Keep track of simulation time information. |
|
A trixel is a single triangle in the Hierarchical Triangular Mesh (HTM) tiling scheme. |
A sub-class of MJDWarning meant for use when astropy.Time cannot interpolate ut1-utc as a function of utc because utc is out of bounds of the data. |
|
A class to generate and evaluate the Zernike polynomials. |
rubin_sim.data api¶
rubin_sim.data Package¶
Functions¶
return a dictionary of the source filenames in the data directory |
|
Get the path to the baseline cadence simulation and the run name |
|
Get the location of the rubin_sim data directory. |
rubin_sim.photUtils api¶
rubin_sim.phot_utils Package¶
Functions¶
|
Read all of the SEDs in sims_sed_library into a dict. |
|
Calculate an expected astrometric error. |
|
Calculate the gamma parameter used for determining photometric signal to noise in equation 5 of the LSST overview paper (arXiv:0805.2366) |
|
Combine all of the noise due to intrumentation into one value |
|
Calculate the AB magnitude of a 5-sigma above sky background source. |
|
Calculate magnitude error using the model from equation (5) of arXiv:0805.2366 |
|
Calculate the magnitudeError for a source, given the bandpass(es) and sky SED. |
|
Calculate the effective number of pixels in a single gaussian PSF. |
|
Calculate the number of sky counts per pixel expected for a given value of the 5-sigma limiting magnitude (m5) |
|
Calculate signal to noise in flux using the model from equation (5) of arXiv:0805.2366 |
|
Calculate the signal to noise ratio for a source, given the bandpass(es) and sky SED. |
|
Calculate the noise due to things that are not the source being observed (i.e. |
|
Convert fwhm_eff to fwhm_geom. |
|
Convert fwhm_geom to fwhm_eff. |
|
Calculate the flux normalization of an SED in the imsim bandpass. |
|
convert flux signal to noise ratio to an error in magnitude |
|
Check the cached Kurucz models and load the model closest to the input stellar parameters. |
Classes¶
|
Hold and use telescope throughput curves. |
|
This class will wrap an OrderedDict of Bandpass instantiations. |
Set up a dictionary of a set of bandpasses (multi-filters). |
|
|
|
|
Calculate extinction values |
This class exists to store default values of seeing, m5, and gamma taken from the over view paper (arXiv 0805.2366, Table 2, 29 August 2014 version) |
|
|
|
A class to store physical constants and other immutable parameters used by the sims_phot_utils code |
|
|
"Hold and use spectral energy distributions (SEDs) |
|
This class will read in a list of Seds from disk and store them. |
rubin_sim.site_models api¶
rubin_sim.site_models Package¶
Functions¶
|
Read in field positions. |
Classes¶
|
Class to load and return pre-computed information about the LSST site. |
|
Handle the cloud information. |
|
LSST cloud calculations for cloud extinction. |
|
Downtime estimates, both scheduled and unscheduled. |
|
Read the scheduled downtime data. |
|
Read the seeing data from disk and return appropriate FWHM_500 value at a given time. |
|
LSST FWHM calculations for FWHM_effective and FWHM_geometric. |
|
Handle (and create) the unscheduled downtime information. |
rubin_sim.skybrightness api¶
rubin_sim.skybrightness Package¶
Functions¶
|
Take in a date_id (that corresponds to a single MJD, and return the star and sky magnitudes in a numpy structured array. |
|
|
|
take an array of ids, and convert them to an integer id. |
|
convert an int back to an id |
|
Really, just return the input. |
|
Load up the ESO spectra. |
|
Use the interquartile range to compute a robust approximation of the RMS. |
|
Fit a simple slope and constant to many healpixels |
|
xdata: numpy array with columns 'alt', 'az', 'sunAlt' all in radians. |
|
Wrap only RA values into 0-2pi (using mod). |
|
The flux at zenith as a linear combination of a twilight component and a constant: alpha = sun altitude (radians) args[0] = ratio of (zenith twilight flux at sunAlt = -12) and dark sky zenith flux args[1] = decay slope for all pixels (mags/radian) args[2] = airmass term for hemisphere away from the sun. |
Classes¶
|
Interpolate the spectra caused by airglow. |
|
Base class for sky components that only need to be interpolated on airmass |
|
Interpolate the spectra caused by the lower atmosphere. |
|
Interpolate the spectra caused by the sum of the scattered starlight, airglow, upper and lower atmosphere. |
|
Read in the saved Lunar spectra and interpolate. |
|
Interpolate the spectra caused by scattered starlight. |
|
|
|
|
|
Interpolate the spectra caused by the upper atmosphere. |
|
Interpolate the zodiacal light based on the airmass and the healpix ID where the healpixels are in ecliptic coordinates, with the sun at ecliptic longitude zero |
rubin_sim.skybrightness_pre api¶
rubin_sim.skybrightness_pre Package¶
Functions¶
|
Load an array of HEALpix maps that have the darkest expected sky backgrounds per filter. |
|
Interpolate angle values (handle wrap around properly). |
Classes¶
|
Load pre-computed sky brighntess maps for the LSST site and use them to interpolate to arbitrary dates. |
rubin_sim.scheduler api¶
rubin_sim.scheduler Package¶
Functions¶
|
run a simulation |
rubin_sim.scheduler.schedulers Package¶
Classes¶
|
Core scheduler that takes completed observations and observatory status and requests observations |
|
remove u in bright time. |
A simple way to schedule what filter to load |
|
|
rubin_sim.scheduler.surveys Package¶
Functions¶
|
Convienence function to generate all the feasibility basis functions |
|
Utility to return a list of standard deep drilling field surveys. |
|
|
|
Classes¶
|
A Markov Decision Function survey object. |
|
A baseclass for survey objects. |
|
Select observations in large, mostly contiguous, blobs. |
|
A survey class for running deep drilling fields. |
|
DDF survey based on Scolnic et al Cadence White Paper. |
|
|
|
Select pointings in a greedy way using a Markov Decision Process. |
|
|
|
Check if incoming observations will need a pair in 30 minutes. |
|
Have a survey object that can plan ahead if it will want to observer a blob later in the night |
|
Take a set of scheduled observations and serve them up. |
|
A target of opportunity class. |
|
Survey class to catch incoming target of opportunity anouncements and try to observe them. |
rubin_sim.scheduler.basis_functions Package¶
Classes¶
|
Only execute right after evening twilight |
|
Reward slews that take little time |
|
Take a list of other mask basis functions, and do an additional check for area available |
|
Basis function to avoid direct wind. |
|
Marks targets as unseen if they are in a specified time window in order to avoid fast revisits. |
|
Boost the reward on parts of the survey that haven't been observed for a while. |
|
Try to replicate the Rothchild et al cadence forcing by only observing on limited az ranges per night. |
|
Reward staying in the same azimuth range. |
|
Balance visits across multiple surveys. |
|
Class that takes features and computes a reward function when called. |
|
|
|
Drive a certain cadence |
Drive a certain cadence, like CadenceEnhanceBasisFunction but with smooth transitions |
|
|
Drive observations at least every N days in a given area |
|
|
|
Just add a constant |
|
Emphasize dec bands on a nightly varying basis |
|
Force things to not run before a given night |
|
Mark the area around the ecliptic |
|
Only let observations happen in a limited time before twilight |
|
Reward staying in the current filter. |
|
Check that the filter(s) needed are loaded |
|
Basis function that tries to maintain a uniformly covered footprint |
|
Basis function to drive observations of a given footprint. |
|
Let's get the rolling really right. |
|
Keep a survey from executing to rapidly. |
|
Limit the fraction of all observations that can be labled a certain survey name. |
Remove the bonus for staying in the same filter if certain conditions are met. |
|
|
Drive observations in good seeing conditions |
|
Limit the sky based on hour angle |
|
Only execute a survey in limited hour angle ranges. |
|
|
|
Mask out pixels that haven't been observed in the night |
|
Look into the future to decide if it's a good time to observe or block. |
|
Basis function based on the 5-sigma depth. |
|
Mark healpixels on a map if their cloud values are greater than the same healpixels on a maximum cloud map. |
|
Similar to Dec_modulo, but now use input masks |
|
Mask pixels based on azimuth |
|
Avoid looking too close to the moon. |
|
Demand the moon is down |
|
Try to get N "good seeing" images each observing season |
|
Reward only reward/count observations at high airmass |
|
Reward areas that have not been observed N-times in the last year |
|
Reward looking into the twilight for NEOs at high airmass |
|
Only return true on certain nights |
|
|
|
Mask out pixels that haven't been observed in the night |
|
Mask the bright planets |
|
Reward taking a sequence of observations. |
|
Say a spot is not available if it will rise substatially before twilight. |
|
Basis function to encourage N observations per observing season |
|
Mask regions that are outside a sky brightness limit |
|
Reward slews that take little time |
|
Like Force_delay, but go ahead and let things catch up if they fall far behind. |
Mask things at various solar elongations |
|
|
Remove the bonus for staying in the same filter if certain conditions are met. |
|
Don't observe unless the sun is above some limit |
|
Don't try unless the sun is below some limit |
|
Basis function that tracks number of observations and tries to match a specified spatial distribution |
|
Basis function that tracks number of observations and tries to match a specified spatial distribution can enter multiple maps that will be used at different times in the survey |
|
Emphasize areas that have not been observed in a long time |
|
If there have been observations in two filters long enough ago, go for a third |
|
Make sure there is some time left in twilight. |
|
Make sure there is enough time before next scheduled observation. |
|
Make sure there is enough time before twilight. |
|
Basis function to create a visit gap based on the survey note field. |
|
Basis function to reward re-visiting an area on the sky. |
|
Just remove the area near zenith. |
|
Mask the zenith, and things that will soon pass near zenith. |
rubin_sim.scheduler.features Package¶
Classes¶
|
Base class for features. |
|
Feature that tracks progreess of the survey. |
|
Track the co-added depth that has been reached accross the sky |
|
Class to hold telemetry information |
Record when the filter last changed. |
|
|
Record the last three observations for each healpixel |
|
Track the last observation. |
|
Track when a pixel was last observed. |
|
When was the last observation |
|
Count the number of observations. |
|
Count the number of observations. |
|
Track how many times something has been observed in a night (Note, even if there are two, it might not be a good pair.) |
|
Count the number of observations. |
|
Track the number of observations that have been made across the sky. |
|
Track how many observations have been taken in the current season that meet criteria |
|
Track the number of observations that have been made across sky |
|
Track the last time an observation with a particular |
|
Track how many pairs have been observed within a night |
|
Track what rotation angles things are observed with. |
|
Keep track of how many times a survey has executed in a night. |
rubin_sim.scheduler.detailers Package¶
Functions¶
|
Use the skybrightness model to find some good target m5s. |
Classes¶
|
A Detailer is an object that takes a list of proposed observations and adds "details" to them. |
|
Randomly set the camera rotation, either for each exposure, or per night. |
|
re-order a list of observations so that the closest in altitude to the current pointing is first. |
|
Detailer to set the camera rotation so rotSkyPos is 0, 90, 180, or 270 degrees. |
|
make a uniform dither pattern. |
|
Directional dithering for Euclid DDFs |
|
Demand one filter always be taken as a certain number of exposures |
|
Detailer to force a specific sky angle. |
|
Update the flush-by MJD to be before any scheduled observations |
|
Convert all the rotTelPos values to rotSkyPos_desired |
|
Check if the area has been observed with a short exposure time this year. |
|
Set the camera rotation to +/- 45 degrees so diffraction spikes align along chip rows and columns |
|
|
|
|
|
Vary the exposure time on observations to try and keep each observation at uniform depth. |
|
Detailer to set the camera rotation to be apporximately zero in rotTelPos. |
rubin_sim.scheduler.model_observatory Package¶
Classes¶
|
A Kinematic model of the telescope. |
|
A class to generate a realistic telemetry stream for the scheduler |
|
Dummy class that will always say there are no clouds |
Dummy class to always return nominal seeing |
rubin_sim.scheduler.utils Package¶
Functions¶
|
Calculate how to normalize a Target_map_basis_function. |
|
Based on the Olsen et al Cadence White Paper |
|
Tesselate the sphere with a square footprint |
|
Make an offset map so seasons roll properly |
Return a numpy array that could be a handy observation record |
|
|
Given the goal maps, compute the ratio of observations we want in each filter. |
|
Define a Galactic Plane region. |
|
Set up a healpix map over the entire sky. |
|
Generate the matrix for the distance between town i and j |
|
Handy function that will put together a target map in the proper order. |
|
Given an array of x,y points, sort them into concentric hulls |
|
|
|
Calculate RA/dec on sky of object with x/y and RA/Cen of field of view. |
|
Calculate x/y projection of ra1/dec1 in system with center at r_acen, deccen. |
|
Generate a KD-tree of healpixel locations |
|
Make sure values are within min/max |
|
Like scipy.binned_statistic, but for unique int ids |
|
Define the Galactic Plane region. |
|
Generate rolling footprints |
|
Utility to convert healpix map resolution if needed and change hp.UNSEEN values to np.nan. |
|
Combine the hulls |
|
Define the North Ecliptic Spur region. |
|
Return all the RA,dec points for the centers of a healpix map, in radians. |
|
XXXX--depriciated, use tsp instead. |
|
Put the scheduler and observatory in the state they were in. |
|
Rotate ra and dec coordinates to be centered on a new dec. |
|
Find the length of a route |
|
Make a little table for recording the information about a run |
Make an array to hold pre-scheduling observations |
|
|
Define the South Celestial Pole region. |
|
Compute what season a night is in with possible offset and modulo using convention that night -365 to 0 is season -1. |
|
Utility function to set a default nside value across the scheduler. |
|
Helper function for generating rolling footprints |
|
Divide a healpix map in an intelligent way |
|
simple map split |
|
via https://stackoverflow.com/questions/1878907/the-smallest-difference-between-2-angles |
|
A quick function to generate the "standard" goal maps. |
|
Iterates over all possible 3-optional transformations. |
|
Find a route through towns |
|
Replay a list of observations into the scheduler |
|
|
|
Define a region based on declination limits only. |
|
Define a WFD region with a dust extinction limit. |
|
Define a wide fast deep region with a galactic plane limit. |
|
Wrap RA into 0-2pi and Dec into +/0 pi/2. |
Classes¶
|
Helper class that can be used to describe the time evolution of a HEALpix in a footprint |
|
|
|
|
|
An object to compute the desired survey footprint at a given time |
|
An object to combine multiple Footprint objects. |
|
Return the healpixels within a ComCam pointing. |
|
Return the healpixels within a pointing. |
|
Find the cross-correlation of a healpix map and a bunch of rotated pointings |
|
Class to help force comparisons be made on scaled up integers, preventing machine precision issues cross-platforms |
|
Convert a list of telescope pointings and convert them to a pointing map |
Record how to convert an observation array to the standard opsim schema |
|
|
Wrapper to deliver a targetoO object at the right time |
|
Generate survey footprint maps in each filter. |
|
|
|
|
|
|
|
Class to hold information about a target of opportunity object |
rubin_sim.movingObjects api¶
rubin_sim.moving_objects Package¶
Functions¶
|
Evaluate a Chebyshev series and first derivative at points x. |
|
Fit Chebyshev polynomial constrained at endpoints using Newhall89 approach. |
Find where the oorb files should be installed |
|
|
Compute C1^(-1)C2 using Newhall89 approach. |
|
Compute C1^(-1)C2 using Newhall89 approach without dx/dt |
|
Read the opsim database. |
|
Read the orbits from the orbit_file. |
|
Generate the observations. |
|
Classes¶
|
Base class to generate observations of a set of moving objects. |
|
Generates chebyshev coefficients for a provided set of orbits. |
Calculates positions, velocities, deltas, vmags and elongations, given a series of coefficients generated by ChebyFits. |
|
|
Generate observations of a set of moving objects: exact ephemeris at the times of each observation. |
|
Generate observations for a set of Orbits using linear interpolation. |
|
Orbits reads, checks for required values, and stores orbit parameters for moving objects. |
|
Generate ephemerides and propagate orbits using the python interface to Oorb. |
rubin_sim.maf api¶
rubin_sim.maf.batches Package¶
Functions¶
|
Generate a large set of metrics about the metadata of each visit - distributions of airmass, normalized airmass, seeing, sky brightness, single visit depth, hour angle, distance to the moon, and solar elongation. |
|
Generate a set of metrics measuring the number visits as a function of alt/az plotted on a HealpixSkyMap. |
|
Generate a set of metrics measuring the number visits as a function of alt/az plotted on a LambertSkyMap. |
|
Metrics for evaluating proper motion and parallax. |
|
Characterization metrics for inner solar system objects. |
|
Characterization metrics for outer solar system objects. |
|
|
|
|
|
|
|
|
|
|
|
Plot the number of observations to the east vs to the west, per night. |
|
An extended set of simple metrics for some quantity. |
An extended set of summary metrics, to calculate all that is in the standard summary stats, plus 25/75 percentiles. |
|
|
Metrics for calculating fO. |
|
Return a list of filters, plot colors and orders. |
|
Generate a set of metrics measuring the number and rate of filter changes over a given span of nights. |
|
Generate a set of metrics measuring the number and rate of filter changes over the entire survey. |
|
Measure the distribution of some basic metadata in the first year of operations - distributions of airmass, seeing, sky brightness, single visit depth. |
|
Creates a list of summary metrics to be applied to any moving object metric which reports a float value, calculating the fraction of the population above X. |
|
Get the colmap dictionary, if you already have a database object. |
|
Generate a handy set of metrics that give a quick overview of how well a survey performed. |
|
Run the hourglass metric, for each individual year. |
|
Generate a set of statistics about the spacing between nights with observations. |
|
Generate a set of statistics about the pair/triplet/etc. |
|
Plot the range of RA/Dec as a function of night. |
|
Calculate basic metrics on visit metadata 'value' (e.g. |
|
Calculate basic metrics on visit metadata 'value', where value is a wrap-around angle. |
|
Calculate 25/50/75 percentile values on maps across sky for a single metadata value. |
|
|
|
|
|
Generate maps of the number of visits and coadded depth (with and without dust extinction) in all bands and per filter. |
|
Count the number of visits per night through the survey. |
|
Look at the distribution of a given sql constraint or footprint constraint's visits, total number and distribution over time (# per night), if possible. |
|
Evaluate open shutter fraction over whole survey and per night. |
|
|
|
Plot a minor subset of the completeness results. |
|
|
|
Plot 5%/25%/50%/75%/95% iles for a metric value. |
|
|
|
|
|
Metrics for evaluating proper motion and parallax. |
|
Read and combine the metric results from split locations, returning a single bundle. |
|
Calculate completeness and create completeness bundles from all N_Chances and Time (child) metrics of the (discovery) bundles in bdict, and write completeness at h_mark to results_db, save bundle to disk. |
|
Calculate fractional completeness of the population for color and lightcurve metrics. |
|
A batch of metrics for looking at survey performance relative to the SRD and the main science drivers of LSST. |
|
Generate a set of statistics about the length and number of seasons. |
|
Set up the slicer and read orbit_file and obs_file from disk. |
|
Generate a set of slew statistics focused on finding the contributions to the overall slew time. |
|
Generate a set of slew statistics focused on the angles of each component (dome and telescope). |
|
Generate a simple set of statistics about the slew times and distances. |
|
Generate a set of slew statistics focused on the speeds of each component (dome and telescope). |
|
Provide useful default ranges for H, based on objtype of population type. |
|
A set of standard simple metrics for some quantity which is a wrap-around angle. |
|
A set of standard simple metrics for some quantity. |
|
A set of standard summary metrics, to calculate Mean, RMS, Median, #, Max/Min, and # 3-sigma outliers. |
|
A simple list of summary metrics to be applied to the Discovery_Time or PreviouslyKnown metrics. |
|
A simple list of summary metrics to be applied to the Discovery_N_Chances metric. |
|
Generate a series of Teff metrics. |
|
Generate a set of statistics about the spacing between nights with observations. |
rubin_sim.maf.metrics Package¶
Functions¶
|
|
|
Given the seasons, return the indexes of each start/end of the season. |
|
"Return estimated nvisits required to well-sample lightcurves that need sampling every tau_obs (days). |
|
Return minimum threshold for priority maps, when considering filter balance. |
|
Calculate a metric value integrated over an h_range. |
|
|
|
|
|
|
|
|
|
Power law distribution of objects. |
|
Calculate the sum of the metric value multiplied by the number of objects at each H value. |
Classes¶
|
Calculate the max of the absolute value of a simData column slice. |
|
Return the percent of the data which has the absolute value of the max value of the data. |
|
Calculate the mean of the absolute value of a simData column slice. |
|
Calculate the median of the absolute value of a simData column slice. |
|
|
|
|
|
Calculate the accumulated stat |
|
Make a 2D version of UniformityMetric |
|
Count fraction of object period we could identify activity for an SSobject. |
|
Count fraction of survey we could identify activity for an SSobject. |
|
|
|
Compute the angular spread statistic which measures uniformity of a distribution angles accounting for 2pi periodicity. |
|
Find the min/max of a value in the best area. |
|
Find the amount of area on the sky that meets a given threshold value. |
|
|
|
Calculate the distance to which one could reach a parallax SNR for a given object Modification of ParallaxMetric, illustrated in https://github.com/jgizis/LSST-BD-Cadence/blob/main/bd_allLT_baseline_17.ipynb |
|
Base class for the metrics. |
|
Base class for the moving object metrics. |
|
Return 1 if there is data. |
|
Assume I can't trust the slewtime or visittime colums. |
|
Calculate the number of seasons (roughly, years) a pointing is observed for. |
|
See what happens if we have chips from different vendors |
|
Calculate the coadded m5 value at this gridpoint. |
ColRegistry tracks the columns needed for all metric objects (kept internally in a set). |
|
|
This metric is appropriate for MBAs and NEOs, and other inner solar system objects. |
|
Count the number of entries in a data column above or below the threshold. |
|
Count the number of x second visits. |
|
Count the length of a simData column slice. |
|
Count the length of a simData column slice, then divide by 'norm_val'. |
|
Count the length of a simData column slice which matches 'subset'. |
|
Return the number of unique values. |
|
Return the magnitude at which the photometric error exceeds crowding_error threshold. |
|
Given a stellar magnitude, calculate the mean uncertainty on the magnitude from crowding. |
|
For plotting up the cumulative number of observations. |
|
Determine how precise a DCR correction could be made |
|
Returns the distance of the first discovery track of an SSobject. |
|
Returns the ecliptic lon/lat and solar elong of the first discovery track of an SSobject. |
|
Identify the discovery opportunities for an SSobject. |
|
Calculate total number of discovery opportunities for an SSobject. |
|
Calculates the number of observations in the first discovery track of an SSobject. |
|
Returns the RA/Dec of the first discovery track of an SSobject. |
|
Returns the time of the first discovery track of an SSobject. |
|
Returns the sky velocity of the first discovery track of an SSobject. |
|
Calculate co-added five-sigma limiting depth after dust extinction. |
|
Calculate co-added five-sigma limiting depth, but apply dust extinction and depth cuts. |
|
Metrics based on a specified number of visits, but returning AREA related to Nvisits: given n_visit, what amount of sky is covered with at least that many visits? |
|
Metrics based on a specified area, but returning NVISITS related to area: given asky, what is the minimum and median number of visits obtained over that much area? (choose the portion of the sky with the highest number of visits first). |
|
Calculate a truncated FFT of the exposure times. |
|
Find the fraction of data values above a given value. |
|
Find the fraction of data values below a given value. |
|
Calculate the full range of an angular (degrees) simData column slice. |
|
Calculate the range of a simData column slice. |
|
Evaluate the survey overlap with desired regions in the Galactic Plane and Magellanic Clouds, by referencing the pre-computed priority maps provided. |
|
Metric to evaluate the gap between sequential seasonal gaps in observations in a lightcurve relative to the scientifically desired sampling interval. |
|
Evaluate the fraction of exposure time spent in each filter as a fraction of the total exposure time dedicated to that healpix in the weighted galactic plane priority maps. |
|
Evaluate the intervals between sequential observations in a lightcurve relative to the scientifically desired sampling interval. |
|
Count number of times an SSobject appears trailed. |
|
Count the number of discovery opportunities (via trailing) for an SSobject. |
|
Calculate the coadded depth for each bin (e.g., per night). |
|
A wrapper to stats.binned_statistic |
|
Plot the filters used as a function of time. |
|
Return the metric value itself . |
|
Identify SSobjects which could have observations suitable to determine colors. |
|
Calculate the (reduce_func) of the gap between consecutive observations in different nights, in days. |
|
Calculate the (reduce_func) of the gap between consecutive observations within a night, in hours. |
|
Identify SSobjects which could be classified as 'previously known' based on their peak V magnitude. |
|
Find the Kuiper V statistic for a distribution, useful for angles. |
|
This metric is appropriate for outer solar system objects, such as TNOs and SDOs. |
This metric is generally applicable to NEOs and MBAs - inner solar system objects. |
|
|
max delta-t and average of the top-10 longest gaps. |
|
Count the number of nights with discovery opportunities with very good software for an SSobject. |
|
Find the maximum gap (in days) in between successive observations. |
|
Calculate the maximum of a simData column slice. |
|
Return the percent of the data which has the maximum value. |
|
Compute the maximum number of changes of state that occur within a given timespan. |
|
Calculate the mean of an angular (degree) simData column slice. |
|
Calculate the mean separation between nights, within a season - then the mean over the campaign. |
|
Calculate the mean of a simData column slice. |
|
Return the mean value of a metric at a given H. |
|
Calculate the median of a simData column slice. |
|
Meta class for metrics, to build a registry of metric classes. |
|
Calculate the minimum of a simData column slice. |
|
Compute the minimum time between changes of state in a column value. |
|
Calculate the completeness (relative to the entire population) <= a given H as a function of time, given the times of each discovery. |
|
Calculate the fraction of the population that meets |
|
Compute the number of times a column value changes. |
|
Count the number of distinct nights an SSobject is observed. |
|
Count the total number of observations where an SSobject was 'visible'. |
|
Count the number of observations for an SSobject, without singles. |
|
Calculate the number of consecutive visits with time differences less than d_t. |
|
Compute the number of changes of state that happen faster than 'cutoff'. |
|
Histogram the number of visits in each night. |
|
Approximate number of galaxies, scaled by median seeing. |
|
Gather relevant information for a night to plot. |
|
Calculate the maximum time span covered in each night, report the |
|
Histogram the number of nights between observations. |
|
Number of points in stellar light curves |
|
Return a metric values divided by 'norm_val'. |
|
Calculate the # of visits less than n_sigma below the mean (n_sigma<0) or more than n_sigma above the mean of 'col'. |
|
Return the number of stars visible above some uncertainty limit, taking image depth and crowding into account. |
|
Calculate the difference between the first and last observation of an SSobject. |
|
Compute the fraction of time the shutter is open compared to the total time spent observing. |
|
Compare the co-added depth of the survey to one where all the observations were taken on the meridian. |
|
What fraction of observations are part of a pair. |
|
Count the number of pairs that could be used for Solar System object detection |
|
Check how well the parallax factor is distributed. |
|
Use the full parallax and DCR displacement vectors to find if they are degenerate. |
|
Calculate the uncertainty in a parallax measurement given a series of observations. |
|
Just pass the entire array through |
|
Pull out the peak V magnitude of all observations of the SSobject. |
|
Find the value of a column at a given percentile. |
|
Determine if we would be able to classify an object as periodic/non-uniform, using an F-test The idea here is that if a periodic source is aliased, it will be indistinguishable from a constant source, so we can find a best-fit constant, and if the reduced chi-squared is ~1, we know we are aliased. |
|
|
|
Measure the maximum gap in phase coverage for observations of periodic variables. |
|
Calculate the uncertainty in the returned proper motion. |
|
Calculate the number of quasars expected with SNR>=5 according to the Shen et al. (2020) QLF - model A in the redshift range zmin < z < zmax. |
|
A metric computing the total exposure time of an riz coadd. |
|
find the radius in the focal plane. |
|
|
|
Calculate uniformity of time between consecutive visits on short timescales (for RAV1). |
|
Calculate the mean of a simData column slice with no nans or infs. |
|
Calculate the relative scatter metric (RMS divided by median). |
|
Calculate the standard deviation of an angular (degrees) simData column slice. |
|
Calculate the standard deviation of a simData column slice. |
|
Use the inter-quartile range of the data to estimate the RMS. |
|
Structure Function (SF) Uncertainty Metric. |
|
Metric to estimate the redshift limit for faint supernovae (x1,color) = (-2.0,0.2) |
|
Measure zlim of type Ia supernovae. |
|
Calculate the number of expected well-measured strongly lensed SN (per data_slice). |
|
Metric to estimate the detection rate for faint supernovae (x1,color) = (-2.0,0.2) |
|
Calculate the length of LSST seasons, in days. |
|
Check if the sky would saturate a visit in an exposure |
|
|
|
Interpolate the stellar luminosity function to return the number of stars per square arcsecond brighter than the mag_limit. |
|
This calculates the Figure of Merit for the combined static probes (3x2pt, i.e., Weak Lensing, LSS, Clustering). |
|
Count up the number of times each string appears in a column. |
|
Calculate the sum of a simData column slice. |
|
Gaussian limit, ignoring systematic errors in photometry |
|
Calculate the Time Delay Challenge metric, as described in Liao et al 2015 (https://arxiv.org/pdf/1409.1254.pdf). |
|
Effective time equivalent for a given set of visits. |
|
Calculate the fraction of images with a previous template image of desired quality. |
|
Histogram the times of the gaps between observations. |
|
Compute the fraction of the time gaps between observations that occur in a given time range. |
|
Calculate the total number of objects of a given population expected at a given H value or larger. |
|
Calculate the total power in the angular power spectrum between lmin/lmax. |
|
Calculate what fraction of the transients would be detected. |
|
Calculate how uniformly the observations are spaced in time. |
|
Return the number of unique values divided by the total number of values. |
|
Metric to classify visits by type of visits |
|
Return the metric value at a given H value. |
|
Calculate the (reduce_func) of the gap between any consecutive observations, in hours, regardless of night boundaries. |
|
Count the number of visits per night within delta_t_min and delta_t_max. |
|
Compute the total volume assuming a metric has values of distance |
|
A proxy metric for WL systematics. |
|
Count the number of bins covered by night_col -- default bins are 'years'. |
|
Return a metric values with the addition of 'zp'. |
rubin_sim.maf.maf_contrib Package¶
Functions¶
|
Plot the skymaps/cartview plots corresponding to alms with specified l-ranges. |
|
Calculate artificial structure, i.e. fluctuations in galaxy counts dN/N, resulting due to imperfect observing strategy (OS). |
|
Calculate the OS bias (as an average across the specified bands) and the uncertainty in the bias (as the std across the cls from thes specified bands). |
|
Analyze the artifacts induced in the coadded 5sigma depth due to imperfect observing strategy. |
|
Coefficients for calculating the first derivatives wrt fs,fb in the Fisher (information) matrix in an effective way, optimized with sympy and cse this function needs to be evaluated for each passband respectively. |
|
Coefficients for calculating the first derivatives wrt t0,te,u0 in the Fisher matrix in an effective way, optimized with sympy and cse via Markus Hundertmark markus.hundertmark@uni-heidelberg.de |
|
The Fisher (information) matrix relying on first derivatives wrt t0,te,u0,fs,fb relying on with cse optimized coefficents. |
|
Estimate galaxy counts for a given HEALpix pixel directly (without a slicer). |
|
Generate a population of KNe events, and put the info about them into a UserPointSlicer object |
Read the Karachentsev+ catalog of nearby galaxies, and put the info about them into a UserPointSlicer object. |
|
|
Generate a UserPointSlicer with a population of microlensing events. |
|
Generate a population of KNe events, and put the info about them into a UserPointSlicer object Parameters ---------- skyregion : string The skyregion of interst. Only two options: 'galactic' and 'extragalaxtic' t_start : float (1) The night to start kilonova events on (days) t_end : float (3652) The final night of kilonova events n_events : int (10000) The number of kilonova events to generate seed : float The seed passed to np.random n_files : int (7) The number of different kilonova lightcurves to use d_min : float or int (10) Minimum luminosity distance (Mpc) d_max : float or int (300) Maximum luminosity distance (Mpc). |
|
Generate a population of TDE events, and put the info about them into a UserPointSlicer object |
|
Generate a population of XRB events, and put the info about them into a UserPointSlicer object |
|
Calculate the FoM based on the bias uncertaity and statistical floor. |
|
Calculate the fraction of the sky observed in a survey. |
|
Given kilonova parameters, get the filename from the grid of models developed by M. |
|
Return the output directory name where the cls for deltaN/N would be, given the input parameters. |
|
Return the data for the five redshift bins, read from the files containing the with BAO galaxy power spectra from Hu Zhan. |
|
Time of Maximum Information before peak |
|
Make a simulated luminosity function for an old (10 Gyr) dwarf galaxy of given |
Create dicts containing g- and i-band LFs for simulated dwarfs between |
|
|
Assign new_value to all pixels in a skymap within pixel_radius of pixels with value <, >, or = find_value. |
|
The microlensing amplification |
|
The microlensing amplification in terms of source flux and blend flux |
|
Calculate/plot the OS bias uncertainty and the statistical floor for the specified redshift bin. |
|
Calculate/plot the OS bias uncertainty and the statistical floor for the specified redshift bin. |
|
Get the cls from .npy files in path+outdir folder for a specified filter band. |
|
Save data in the metricBundle. |
Classes¶
|
This metric calculates the number of galaxies while accounting for the extragalactic footprint. |
Offset along a Fermat's spiral with num_points, out to a maximum radius of max_dither. |
|
Offset along a Fermat's spiral with num_points, out to a maximum radius of max_dither. |
|
|
Offset along a Fermat's spiral with num_points, out to a maximum radius of max_dither. |
|
figure of merit to measure the coverage the time gaps in same and different filter pairs; FoM is defined as sum of Nv / standard deviation after a clip; Parameters: colname: list, ['observationStartMJD', 'filter', 'fiveSigmaDepth'] fltpairs: filter pair, default ['uu', 'ug', 'ur', 'ui', 'uz','uy', 'gg', 'gr', 'gi', 'gz', 'gy', 'rr', 'ri', 'rz', 'ry', 'ii', 'iz', 'iy', 'zz', 'zy', 'yy'] mag_lim: list, fiveSigmaDepth threshold each filter, default {'u':18, 'g':18, 'r':18, 'i':18, 'z':18, 'y':18} bins_same: np.array, bins to get histogram for same-filter pair ; bins_diff: np.array, bins to get histogram for diff-filter pair ; nv_clip: number of visits of pairs to clip, std is calculated below nv_clip allgaps: boolean, all possible pairs if True, else consider only nearest |
|
Detections for on-axis GRB afterglows decaying as |
|
Wrapper metric class for GW170817-like kilonovae based on the TransientAsciiSEDMetric. |
alias of |
|
|
Estimate galaxy counts per HEALpix pixel. |
|
|
|
Read in some KNe lightcurves |
|
Estimate the detection limit in total dwarf luminosity for resolved dwarf galaxies at a given distance. |
|
Quantifies detectability of Microlensing events. |
|
Calculate the distance or number of stars with color uncertainty defined by mags/snrs. |
|
Calculate the number of observations per data slice. |
|
Dictionary that remembers insertion order |
Offset along a diamond circumscribed by a pentagon. |
|
Offset along a diamond circumscribed by a pentagon. |
|
|
Offset along two pentagons, one inverted and inside the other. |
|
Measure the percentage deviation of recovered periods for pure sine wave variability (in magnitude). |
|
From a set of observation times, uses code provided by Robert Siverd (LCOGT) to calculate the spectral window function. |
|
|
|
At each slice_point, run a Monte Carlo simulation to see how well a periodic source can be fit. |
|
Evaluate how well a periodic source can be fit on a short baseline, using a Monte Carlo simulation. |
|
|
Repulsive-randomly dither the RA and Dec pointings up to max_dither degrees from center, one dither offset per new night of observation of a field. |
|
Repulsive-randomly dither the RA and Dec pointings up to max_dither degrees from center, different offset per visit for each field. |
|
Repulsive-randomly dither the RA and Dec pointings up to max_dither degrees from center, one dither offset per night for all the fields. |
|
|
Computes the S/Ns for a given SED. |
|
Calculate the signal to noise metric in a given filter for an object of a given magnitude. |
|
Offsets along a 10pt spiral. |
|
Find the number of stars in a given field in the mass range fainter than magnitude 16 and bright enough to have noise less than 0.03 in a given band. |
|
Find the number of stars in a given field between d1 and d2 in parsecs. |
|
This calculates the Figure of Merit for the combined static probes (3x2pt, i.e., Weak Lensing, LSS, Clustering). |
|
Read in some TDE lightcurves |
|
|
|
|
|
Computes the metric whether the S/N is bigger than the threshold in all the bands for a given SED |
|
Find the number of 'triplets' of three images taken in the same band, based on user-selected minimum and maximum intervals (in hours), as well as constraining the ratio of the two exposures intervals. |
|
Find the number of 'triplets' of three images taken in any band, based on user-selected minimum and maximum intervals (in hours), as well as constraining the ratio of the two exposures intervals. |
|
Calculate the survey depth that a variable star can be reliably identified. |
|
|
|
Synthesize XRB outburst lightcurves. |
rubin_sim.maf.slicers Package¶
Classes¶
|
Base class for all slicers: sets required methods and implements common functionality. |
|
Base spatial slicer object, contains additional functionality for spatial slicing, including setting up and traversing a kdtree containing the simulated data points. |
|
Slices into intervals with common "note" values and no long gaps. |
|
Slicer that uses the ComCam footprint to decide if observations overlap a healpixel center |
|
For use with SDSS stripe 82 square images |
|
A spatial slicer that evaluates pointings on a healpix-based grid. |
|
A spatial slicer that evaluates pointings on a subset of a healpix-based grid. |
|
Slicer to make the filter hourglass plots |
|
Slice moving object _observations_, per object and optionally clone/per H value. |
|
|
|
Nd slicer (N dimensions) |
|
OneD Slicer allows the 'slicing' of data into bins in a single dimension. |
Thrown when a slicer is not setup for the method called. |
|
|
Meta class for slicers, to build a registry of slicer classes. |
|
Base for all time interval slicers. |
|
UniSlicer. |
|
A spatial slicer that evaluates pointings overlapping user-provided list of points. |
|
Slices into intervals each of which contain one visit |
rubin_sim.maf.db Package¶
Functions¶
|
Adds information about a MAF analysis run to a MAF tracking database. |
Classes¶
|
Define contents and format of the displays table. |
|
Define contents and format of metric list table. |
|
Define contents and format of plot list table. |
|
The ResultsDb is a sqlite database containing information on the metrics run via MAF, the plots created, the display information (such as captions), and any summary statistics output. |
|
Define contents and format of the summary statistics table. |
|
Sqlite database to track MAF output runs and their locations, for show_maf |
|
rubin_sim.maf.maps Package¶
Functions¶
|
Reads and saves a 3d dust extinction file, return extinction at specified points (ra/dec/ or pixels). |
|
Reads and saves the galactic plane priority maps. |
|
Given a goal x value, find y values at the closest x value. |
A convenience function to make keeping the map key formats in sync in various places |
Classes¶
|
|
|
Compute the E(B-V) for each point in a given spatial distribution of slicePoints. |
|
The DustMap3D provides a |
|
Read and return the galactic plane priority map data at each slice_point. |
|
Meta class for Maps, to build a registry of maps classes. |
|
Return the cumulative stellar luminosity function for each slice_point. |
|
Return the cumulative stellar luminosity function for each slice_point. |
rubin_sim.maf.stackers Package¶
Functions¶
|
Finds telescopes larger than min_size, from list of large telescopes based on http://astro.nineplanets.org/bigeyes.html. |
Fit a line to how the sky brightness changes with airmass. |
|
|
Identify dither offsets which fall within the inscribed hexagon. |
|
Find the x,y coords of a polygon. |
|
Convert RA/Dec (and telescope site lat/lon) to alt/az. |
|
|
|
Wrap only RA values into 0-2pi (using mod). |
|
Wrap RA into 0-2pi and Dec into +/0 pi/2. |
Classes¶
|
Add apparent magnitude of an object for the current h_val (compared to Href in the orbit file), incorporating the magnitude losses due to trailing/detection, as well as the color of the object. |
|
Base class for dither stackers. |
Base class for moving object (SSobject) stackers. |
|
Base MAF Stacker: add columns generated at run-time to the simdata array. |
|
|
Stacker to estimate m5 "coadded" per band and par night |
|
Class to hold the unit and source locations for columns. |
|
Add a cometary apparent magnitude, including nucleus and coma, based on a calculation of Afrho (using the current h_val) and a Halley-Marcus phase curve for the coma brightness. |
|
Calculate the RA,Dec offset expected for an object due to differential chromatic refraction. |
|
Add ecliptic latitude/longitude (ecLat/ecLon) to the slicer ssoObs (in degrees). |
|
Add the ecliptic coordinates of each RA/Dec pointing: eclipLat, eclipLon Optionally subtract off the sun's ecliptic longitude and wrap. |
|
Calculate the 5-sigma limiting depth for a point source in the given conditions. |
|
Add the galactic coordinates of each RA/Dec pointing: gall, galb |
|
Use offsets from the hexagonal grid of 'hexdither', but visit each vertex sequentially. |
|
Use offsets from the hexagonal grid of 'hexdither', but visit each vertex sequentially. |
|
Use offsets from the hexagonal grid of 'hexdither', but visit each vertex sequentially. |
|
Add the Hour Angle for each observation. |
|
Make a new m5 column as if observations were taken on the meridian. |
|
Add columns relevant to SSobject apparent magnitudes and visibility to the slicer ssoObs dataframe, given a particular Href and current h_val. |
|
For each observation, find the max distance to a ~144 km NEO, also stack on the x,y position of the object. |
|
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. |
|
Calculate the normalized airmass for each opsim pointing. |
|
Add the parallactic angle to each visit. |
|
Calculate the parallax factors for each opsim pointing. |
|
Randomly dither the RA and Dec pointings up to max_dither degrees from center, one dither offset per new night of observation of a field. |
|
Randomly dither the RA and Dec pointings up to max_dither degrees from center, with a different offset for each field, for each visit. |
|
Randomly dither the RA and Dec pointings up to max_dither degrees from center, one dither offset per night. |
Randomly dither the physical angle of the telescope rotator wrt the mount, after every filter change. |
|
|
Add SNR and visibility for a particular object, given the five sigma depth of the image and the apparent magnitude (whether from AppMagStacker or CometAppMagStacker, etc). |
|
Calculate the saturation limit of a point source. |
|
convert the p1,p2,p3. |
|
Offset along an equidistant spiral with num_points, out to a maximum radius of max_dither. |
|
Offset along an equidistant spiral with num_points, out to a maximum radius of max_dither. |
|
Offset along an equidistant spiral with num_points, out to a maximum radius of max_dither. |
|
Meta class for Stackers, to build a registry of stacker classes. |
|
Add an 'areaId' column to flag whether a visit was inside the 'footprint'. |
|
Calculate the zenith distance for each pointing. |
rubin_sim.maf.plots Package¶
Functions¶
|
|
|
Set up x or color bar limits. |
|
Classes¶
Serve as the base type for MAF plotters and example of API. |
|
|
A mix-in to allow the HourglassPlot to accept categorical data, rather than float/int. |
|
Special plotter to generate and label fO plots. |
|
Make an hourglass plot |
Generate a sky map of healpix metric values using healpy's mollweide view. |
|
Use basemap and contour to make a Lambertian projection. |
|
Plot metric values versus H. |
|
|
Plot metric values (at a particular H value) vs. |
|
Plot metric values (at a particular H value) as function of orbital parameters, using points for each metric value. |
|
Plot categorical data for a Month. |
|
Make an hourglass plot for a month |
|
Plot categorical 'use' data for one month. |
|
Special plotter to calculate and plot the maximum distance an H=22 NEO could be observable to, in any particular particular opsim observation. |
|
|
Plot a single axes from the sliceColList, identified by plot_dict['axis'], given the metric_values at all slicepoints [sums over non-visible axes]. |
|
|
Object designed to help organize multiple MetricBundles that will be plotted together using the PlotHandler. |
|
|
|
Plot categorical data for a range of dates. |
Special plotter to summarize metrics which return a set of values at each slice_point, such as if a histogram was calculated at each slice_point (e.g. |
|
|
A mix-in to allow the HourglassPlot to accept categorical 'use' data rather than float/int. |
|
|
Plot 2 axes from the slicer.sliceColList, identified by plot_dict['xaxis']/['yaxis'], given the metric_values at all slicepoints [sums over non-visible axes]. |
|
Given an opsim2dSlicer, figure out what fraction of observations are in singles, pairs, triples, etc. |
|
Bare-bones plotter for making scatter plots. |
|
|
Plot categorical data for a year. |
|
Make an array of monthly hourglass plots for a year. |
|
Plot categorical 'use' data for one year. |
rubin_sim.maf.metric_bundles Package¶
Functions¶
Create an empty metric bundle. |
|
Create an empty metric bundle. |
|
|
Utility to convert a list of MetricBundles into a dictionary, keyed by the fileRoot names. |
|
Make a mock metric bundle from a bundle which had MoCompleteness or MoCumulativeCompleteness summary metrics run. |
Classes¶
|
The MetricBundle is defined by a combination of a (single) metric, slicer and constraint - together these define a unique combination of an opsim benchmark. |
|
The MetricBundleGroup exists to calculate the metric values for a group of MetricBundles. |
|
|
|
rubin_sim.maf.run_comparison Package¶
Functions¶
|
Load metric data from disk and import them into metricBundles. |
|
Helper function for gather_summaries |
|
Plots a confusion matrix type plot comparing two metric types. |
|
Create a DataFrame that defines a metric set. |
|
Display (in a jupyter on IPython notebook) family descirptions |
|
Returns an array of the following form where A = fisher criteria and B = detection criteria: [[(Yes A and Yes B), (Yes A and No B)], [(No A and Yes B), (No A and No B)]] where Yes A and Yes B are the number of events that pass both the A and B criteria. |
|
Returns an array of the following form where A = detect criteria and B = npts criteria: [[(Yes A and Yes B), (Yes A and No B)], [(No A and Yes B), (No A and No B)]] where Yes A and Yes B are the number of events that pass both the A and B criteria. |
|
Download opsim visit databases for specified runs to a local directory. |
|
|
|
Returns an array of the following form where A = fisher criteria and B = npts criteria: [[(Yes A and Yes B), (Yes A and No B)], [(No A and Yes B), (No A and No B)]] where Yes A and Yes B are the number of events that pass both the A and B criteria. |
Find resultsDbs in a series of directories and gather up their summary stats into a single CSV or hdf5 file. |
|
|
Get description of families or funs. |
|
Load a data frame that supplies run names for each run family |
|
Get metadata on named sets of related metrics. |
|
Get summary metric values for a set of runs and metrics. |
|
Plots the results from the discovery/detect metric, Npts metric, and Fisher metric in three sub plots |
|
Create a dictionary of result_db from result_db files via PCW Hackathan 2020 Resources |
|
Load metadata on opsim runs into a |
|
Processes a folder, puts together results for discovery/detect metric, Npts metric, and Fisher metric, and plots them in the four tE bins of 1 - 10 days, 10 - 30 days, 30 - 100 days, and 100 - 1000 days. |
|
Normalize values in a dataframe to a given run, return output in a dataframe. |
|
Create a normalized |
|
Parses names of MicrolensingMetric file names |
|
Plots confusion matrix type plots comparing fraction detected, characterized (via Fisher), and fraction of events with at least npts_required points within 2 tE |
|
Plots the results from the discovery/detect metric, Npts metric, and Fisher metric in three sub plots |
|
Plot normalized metric values as colored points on a cartesian plane. |
|
Plot normalized metric values as colored points on a cartesian plane. |
|
make a radar plot! |
|
Write an updated metric_set dataframe to disk |
rubin_sim.maf.utils Package¶
Functions¶
|
Calculate the approximate precision of astrometric measurements, given a particular seeing and SNR value. |
|
Calculate the coadded depth expected for a given number of visits and single visit depth. |
|
Collapse a data_slice into per-filter, per-night values for the 'night', 'filter', 'median observationStartMJD', and 'fiveSigmaDepth'. |
Get today's date and a dictionary with the MAF version information. |
|
|
Query an opsim database for the needed data columns and run any required stackers. |
Load up and return instumental zeropoints and atmospheric extinctions |
|
|
Calculate the SNR for a star of magnitude m in an observation with 5-sigma limiting magnitude depth m5. |
|
Convert a string to a more file name (and web) friendly format. |
|
Set an 'optimal' number of bins using the Freedman-Diaconis rule. |
|
Calculate the minimum and maximum values of a distribution of points, after discarding data more than 'percentile' from the median. |
|
Print dictionaries (and/or nested dictionaries) nicely. |
|
Print a simple one-level nested dictionary nicely across the screen, with one line per top-level key and all sub-level keys aligned. |
|
Calculate the nearest healpixel ID of an RA/Dec array, assuming nside. |
|
Set the design and stretch values of the number of visits, area of the footprint, seeing values, FWHMeff values, skybrightness, and single visit depth (based on SRD values). |
|
Calculate the uncertainty in fitting a line, as given by the spread in x values and the uncertainties in the y values. |
rubin_sim.maf.web Package¶
Classes¶
|
Class to read MAF's resultsDb_sqlite.db and organize the output for display on web pages. |
|
Class to read MAF's tracking SQLite database (tracking a set of MAF runs) and handle the output for web display. |