Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor and unify the interface for the raster image, contours, and …
…vector overlay. (#123) * Add apply_vector_overlay and clear_vector_overlay * Add set_vector_overlay_color and set_vector_overlay_colormap * Minor modification * Add configure_vector_overlay * Minor modification for comments * Deduce pixel_averaging_enabled and threshold_enabled * Deduce debiasing and modify description * Minor modification * Add set_style plot set_visible show hide for vector overlay * Minor modification * Modify plot_vector_overlay * Minor modification * Modify setIntensityRange and setLengthRange * Modification of setting intensity range in set_vector_overlay_style * Monor modification * Replace None with non-empty string * Adopt macro in configure_vector_overlay * Modification to set_vector_overlay_style * Modify plot_vector_overlay * Logic modification to set_vector_overlay_style * Minor modification to description * Modify validate check for intensity_max and intensity_min * Move bias and contrast fom set_colormap to set_scaling * Update outdated syntax * Add Undefined class in util * Simplify intensity_min and intensity_max definition * Modification to description and setIntensityRange logic * Description modified * Add colormap default description * Add default value for color * Format fix * Fix complaint in latest flake8 * Make all parameters to set_scaling optional; set alpha and gamma regardless of scaling parameter; require Auto.AUTO to reset contrast and bias, otherwise leave unmodified * Updated descriptions for alpha and gamma * Added some min/max validation; added unit tests * formatting pass and flake8 fix * Added some magic for specifying optional and repeated validation parameters more cleanly. Did some refactoring for legibility. Still to be tested. * Some tests; minor fixes and refactoring * Simplified optional parameters * Moved vector overlay functions to sub-object. * Refactored plot function to avoid unnecessary calls. Completed vector overlay tests. * Added check for subobjects on image * Added missing module to docs. * First pass to split up image subobjects. Contour and raster tests to be completed. Refactored tests to reuse common fixtures. * Removed unnecessary fixture * Refactored raster functions. Moved contours histogram flag to contours class. Completed unit tests for raster. * formatting pass * Finished refactoring vector overlay and test. Added helper function for copying validation parameters from other functions. * Refactored contours and added contour tests * Factored WCS overlay functions out of session and into subobject * Moved WCS overlay settings out of session into a subobject, and refactored the interface. * Fixed syntax bug. * Added basic tests for overlay functions, and fixed some bugs. * Updated quickstart examples for refactored interface * Split contour dash mode and thickness into two functions. * Renamed beam.beam_type and beam.set_beam_type to remove extra beam * Removed histogram functions based on feedback * Fixed global_ name in docs. * Set session attribute on overlay components correctly. Escape backslash in docstring. * Correctly pass the session to the overlay component constructor(s) * Rename session's overlay attribute to wcs * Fixed names of beam type property and action * Remove bogus custom text from colorbar numbers component * Fixed broken font style pattern * Added missing font size functionality to overlay components with fonts * Remove bogus visibility settings from ticks * Remove ticks from visibility tests * Fixed path of method to enable custom colorbar label text. Added tests for both custom text functions in image. * Refactored and expanded image-specific WCS overlay properties * Rename wcs subobject in instructions * Make custom text API match the beam API * Added session.raster with pixel grid controls; fixed test logic for comparing enum return values * remove outdated TODO comments * Added spectral conversion for PV images to image class * Added missing modules to generated docs * Updated docstrings for spectral conversion functions. * remove function for toggling labels --------- Co-authored-by: Adrianna Pińska <[email protected]>
- Loading branch information