plot_focal_length_temperature_dependence¶
- giant.calibration.visualizer.plot_focal_length_temperature_dependence(calib, show_individual_focal_lengths=True, pdf_name=None)[source]¶
This function generates a figure of the camera model’s focal length temperature dependence.
The temperature dependence is shown over the range of temperatures of the camera for the images currently contained in the images in the camera as a line. Optionally, if
show_individual_focal_lengths
is set toTrue
, this function will go through and estimate just the focal length with no temperature dependence for each image individually (holding all other parameters of the camera model fixed) and plot these individual focal lengths as a scatter plot on the figure. If this is requested, thenid_stars()
must have been called at least once.Note that this function assumes that the camera model being estimated is a subclass of
PinholeModel
here and that it follows the same convention for the temperature dependence as thePinholeModel
. If the camera model being estimated does not implement aget_temperature_scale()
then this function will raise an exception. Additionally, if it deviates significantly from thePinholeModel
and its subclasses in the way it handles focal length/temperature dependence this function will likely run into issues, therefore it is recommended to either use one of the existing GIANTPinholeModel
subclasses or be extra careful in how you implement your own camera model to mimic thePinholeModel
- Raises:
ValueError – if the camera model doesn’t implement a
get_temperature_scale()
method.- Parameters:
calib (Calibration) – The calibration object to plot the results for
show_individual_focal_lengths (bool) – A boolean flag specifying whether to plot the individual focal lengths for each image
pdf_name (Path | str | None) – Save the plot to this file name as a pdf