Calibration.limit_magnitude

giant.calibration.calibration_class:

Calibration.limit_magnitude(min_magnitude, max_magnitude, in_place=False)[source]

This method removes stars from the matched_... attributes that are not within the provided magnitude bounds.

This method should be used rarely, as you can typically achieve the same functionality by use the StarID.max_magnitude and StarID.min_magnitude attributes before calling id_stars(). The most typical use case for this method is when you have already completed a full calibration and you now either want to filter out some of the stars for plotting purposes, or you want to filter out some of the stars to do an alignment analysis, where it is generally better to use only well exposed stars since fewer are needed to fully define the alignment.

When you use this method, by default it will edit and return a copy of the current instance to preserve the current instance. if you are using many images with many stars in them this can use a large amount of memory; however, so you can optionally specify in_place=True to modify the current instance in place. Note however that this not a reversible operation (that is you cannot get back to the original state) so be cautious about using this option.

Parameters:
  • min_magnitude (float) – The minimum star magnitude to accept (recall that minimum magnitude limits the brightest stars)

  • max_magnitude (float) – The maximum star magnitude to accept (recall that maximum magnitude limits the dimmest stars)

  • in_place – A flag specifying whether to work on a copy or the original

Returns:

The edited Calibration instance (either a copy or a reference)

Return type:

Calibration