autowisp.browser_interface.diagnostics.exclusion_mask module
Class Inheritance Diagram

The exclusion mask the diagnostics plot can apply to every row.
Any library expression usable as an exclusion rule can be chosen in the footer of the plot page, with the channel and photometry its slots are bound to. The points it would exclude are then drawn faintly, and each row says how many there are, so that a rule can be judged against the very diagnostics it reads before a step is run with it. It is decided by the engine’s own machinery, so a preview shows what a fit would leave out.
- autowisp.browser_interface.diagnostics.exclusion_mask.decide_mask(mask, image_ids, drawn, *, expressions, db_session)[source]
Return what an exclusion mask excludes of one row’s drawn points.
The images are decided for in the channel and photometry the mask names, not in any the row binds: a row may bind several channels, and none of them need be the one the rule was meant for.
- Parameters:
mask (dict) – The
rule, as configured, and thechannelandphotometryits slots are bound to, as the page posts them.image_ids (numpy.ndarray) – The images the row’s values run over.
drawn (numpy.ndarray) – Which of them are drawn, the only ones decided for.
expressions (dict) – The library,
{name: expression}.db_session – An active SQLAlchemy database session.
- Returns:
- Per image, whether it is drawn and excluded; none
where nothing could be decided.
- dict: What the row’s Excluded cell says:
text, how many of its points are excluded or briefly why none could be decided for, and
title, shown on hovering over it, the whole of the why.
- Return type:
numpy.ndarray
- autowisp.browser_interface.diagnostics.exclusion_mask.get_mask_options(expressions, db_session)[source]
Return what the footer of the plot page offers to mask with.
- Parameters:
expressions (dict) – The library,
{name: expression}.db_session – An active SQLAlchemy database session.
- Returns:
exclusion_masks, each expression usable as a rule withthe read it is configured with and which slots that read binds;
mask_channels, every channel some camera has; andmask_photometries, each recorded photometry with its label.
- Return type: