SimpleAperturePhotometry#
- class jdaviz.configs.imviz.plugins.aper_phot_simple.aper_phot_simple.SimpleAperturePhotometry(*args, **kwargs)[source]#
Bases:
PluginTemplateMixin,ApertureSubsetSelectMixin,DatasetMultiSelectMixin,TableMixin,PlotMixin,MultiselectMixinThe Aperture Photometry plugin performs aperture photometry for drawn regions. See the Aperture Photometry Plugin Documentation for more details.
Only the following attributes and methods are available through the public plugin API:
fitted_modelsDictionary of fitted models.fit_radial_profileWhether to fit a radial profile to the data.aperture(SubsetSelect):background(SubsetSelect):background_valueFixed value to use as background level.counts_factorFactor to convert data unit to counts, in unit of flux/counts.current_plot_typeChoice of Curve of Growth, Radial Profile, or Radial Profile (Raw). Only applicable whenmultiselect=False.dataset(DatasetSelect):flux_scalingFlux scaling factor for calculation of magnitudes in output table.multiselectEnable multiselect mode to select multiple datasets for aperture photometry.pixel_areaIn arcsec squared, only used if data is in units of surface brightness.
plot(Plot):Plot, based on selection of
current_plot_type. Only applicable whenmultiselect=False
table(Table):Table with photometry results.
cube_sliceCurrent slice wavelength being used for aperture photometry (cubes only, read-only).
Public constructor
Attributes Summary
An int trait.
An instance of a Python list.
A trait for unicode strings.
Mixin to handle empty floating point field.
Mixin to handle empty floating point field.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A trait for unicode strings.
A boolean (True, False) trait.
An instance of a Python list.
Mixin to handle empty floating point field.
A trait for unicode strings.
A boolean (True, False) trait.
A trait for unicode strings.
A boolean (True, False) trait.
Mixin to handle empty floating point field.
A boolean (True, False) trait.
A boolean (True, False) trait.
An instance of a Python list.
A trait which allows any value.
A boolean (True, False) trait.
A trait for unicode strings.
An instance of a Python list.
A boolean (True, False) trait.
Methods Summary
calculate_batch_photometry([options, ...])Run aperture photometry over a list of options.
calculate_photometry([dataset, aperture, ...])Calculate aperture photometry given the values set in the plugin or any overrides provided as arguments here (which will temporarily override plugin values for this calculation only).
unpack_batch_options(**options)Unpacks a dictionary of options for batch mode, including all combinations of any values passed as tuples or lists. For example::.
vue_do_aper_phot(*args, **kwargs)Attributes Documentation
- aperture_area#
An int trait.
- background_items#
An instance of a Python list.
- background_selected#
A trait for unicode strings.
- background_value#
Mixin to handle empty floating point field.
- counts_factor#
Mixin to handle empty floating point field.
- cube_slice#
A trait for unicode strings.
- current_plot_type#
A trait for unicode strings.
- display_solid_angle_unit#
A trait for unicode strings.
- display_unit#
A trait for unicode strings.
- fit_radial_profile#
A boolean (True, False) trait.
- fit_results#
An instance of a Python list.
- fitted_models#
- flux_scaling#
Mixin to handle empty floating point field.
- flux_scaling_display_unit#
A trait for unicode strings.
- flux_scaling_multi_auto#
A boolean (True, False) trait.
- flux_scaling_warning#
A trait for unicode strings.
- is_cube#
A boolean (True, False) trait.
- pixel_area#
Mixin to handle empty floating point field.
- pixel_area_multi_auto#
A boolean (True, False) trait.
- plot_available#
A boolean (True, False) trait.
- plot_types#
An instance of a Python list.
- radial_plot#
A trait which allows any value.
- result_available#
A boolean (True, False) trait.
- result_failed_msg#
A trait for unicode strings.
- results#
An instance of a Python list.
- template_file = ('/home/docs/checkouts/readthedocs.org/user_builds/jdaviz/envs/3978/lib/python3.11/site-packages/jdaviz/configs/imviz/plugins/aper_phot_simple/aper_phot_simple.py', 'aper_phot_simple.vue')#
- user_api#
- uses_active_status#
A boolean (True, False) trait.
Methods Documentation
- calculate_batch_photometry(options=[], add_to_table=True, update_plots=True, full_exceptions=False)[source]#
Run aperture photometry over a list of options. Unprovided options will remain at their values defined in the plugin.
To provide a list of values per-input, use
unpack_batch_optionsto and pass that as input here.- Parameters:
- optionslist
Each entry will result in one computation of aperture photometry and should be a dictionary of values to override from the values set in the plugin/traitlets.
- add_to_tablebool
Whether to add results to the plugin table.
- update_plotsbool
Whether to update the plugin plots for the last iteration.
- full_exceptionsbool, optional
Whether to expose the full exception message for all failed iterations.
- calculate_photometry(dataset=None, aperture=None, background=None, background_value=None, pixel_area=None, counts_factor=None, flux_scaling=None, add_to_table=True, update_plots=True)[source]#
Calculate aperture photometry given the values set in the plugin or any overrides provided as arguments here (which will temporarily override plugin values for this calculation only).
Note: Values set in the plugin for cubes are in the selected display unit from the Unit conversion plugin. Overrides are, as the docstrings note, assumed to be in the units of the selected dataset.
- Parameters:
- datasetstr, optional
Dataset to use for photometry.
- aperturestr, optional
Subset to use as the aperture.
- backgroundstr, optional
Subset to use to calculate the background.
- background_valuefloat, optional
Background to subtract, same unit as data. Automatically computed if
backgroundis set to a subset.- pixel_areafloat, optional
Pixel area in arcsec squared, only used if data unit is a surface brightness unit.
- counts_factorfloat, optional
Factor to convert data unit to counts, in unit of flux/counts.
- flux_scalingfloat, optional
Same unit as data, used in -2.5 * log(flux / flux_scaling).
- add_to_tablebool, optional
- update_plotsbool, optional
- Returns:
- table row, fit results
- unpack_batch_options(**options)[source]#
Unpacks a dictionary of options for batch mode, including all combinations of any values passed as tuples or lists. For example:
unpack_batch_options(dataset=['image1', 'image2'], aperture=['Subset 1', 'Subset 2'], background=['Subset 3'], flux_scaling=3 )
would result in:
[{'aperture': 'Subset 1', 'dataset': 'image1', 'background': 'Subset 3', 'flux_scaling': 3}, {'aperture': 'Subset 2', 'dataset': 'image1', 'background': 'Subset 3', 'flux_scaling': 3}, {'aperture': 'Subset 1', 'dataset': 'image2', 'background': 'Subset 3', 'flux_scaling': 3}, {'aperture': 'Subset 2', 'dataset': 'image2', 'background': 'Subset 3', 'flux_scaling': 3}]
- Parameters:
- optionsdict, optional
Dictionary of values to override from the values set in the plugin/traitlets. Each entry can either be a single value, or a list. All combinations of those that contain a list will be exposed. If not provided and the plugin is in multiselect mode (
multiselect = True), then the current values set in the plugin will be used.
- Returns:
- optionslist
List of all combinations of input parameters, which can then be used as input to
calculate_batch_photometry.