.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "auto_examples/plot_schema.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code. .. rst-class:: sphx-glr-example-title .. _sphx_glr_auto_examples_plot_schema.py: JSON Schema for Photometry Settings =================================== The JSON schema for photometry settings is here. .. GENERATED FROM PYTHON SOURCE LINES 7-14 .. rst-class:: sphx-glr-script-out .. code-block:: none { "$defs": { "AAVSOFilters": { "description": "The definitive list of AAVSO filters is at https://www.aavso.org/filters", "enum": [ "U", "B", "V", "RJ", "R", "I", "IJ", "J", "H", "K", "TG", "TB", "TR", "CV", "CR", "SZ", "SU", "SG", "SR", "SI", "GG", "GBP", "GRP", "STU", "STV", "STB", "STY", "STHBW", "STHBN", "MA", "MB", "MI", "ZS", "Y", "HA", "HAC", "CBB", "O" ], "title": "AAVSOFilters", "type": "string" }, "Camera": { "additionalProperties": false, "description": "A class to represent a CCD-based camera.", "properties": { "name": { "description": "Name of the camera", "examples": [ "SBIG FakeCam", "ZWO NadaCam", "CG16m" ], "title": "Name", "type": "string" }, "data_unit": { "description": "units of the data", "examples": [ "adu", "DN", "count" ], "title": "Data Unit", "type": "string" }, "gain": { "description": "unit should be consistent with data and read noise", "examples": [ "1.5 electron / adu", "1.0 electron / DN", "1.0 photon / count" ], "title": "Gain", "type": "string" }, "read_noise": { "description": "unit should be consistent with dark current", "examples": [ "10.0 electron", "10.0 electron", "10.0 photon" ], "title": "Read Noise", "type": "string" }, "dark_current": { "description": "unit consistent with read noise, per unit time", "examples": [ "0.01 electron / second", "0.01 electron / second", "0.01 photon / second" ], "title": "Dark Current", "type": "string" }, "pixel_scale": { "description": "units of angle per pixel", "examples": [ "0.6 arcsec / pix" ], "title": "Pixel Scale", "type": "string" }, "max_data_value": { "description": "maximum data value while performing photometry", "examples": [ "50000 adu", "50000 DN", "50000 count" ], "gt": 0, "title": "Max Data Value", "type": "string" } }, "required": [ "name", "data_unit", "gain", "read_noise", "dark_current", "pixel_scale", "max_data_value" ], "title": "Camera", "type": "object" }, "FwhmMethods": { "description": "Available methods for finding FWHM of stars.", "enum": [ "fit", "moments", "profile" ], "title": "FwhmMethods", "type": "string" }, "LoggingSettings": { "additionalProperties": false, "description": "Settings for logging.", "properties": { "logfile": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "File to save log to", "title": "Logfile" }, "console_log": { "default": true, "description": "Show log on console?", "title": "Console Log", "type": "boolean" } }, "title": "LoggingSettings", "type": "object" }, "Observatory": { "additionalProperties": false, "description": "Class to represent an observatory.", "properties": { "name": { "description": "Name of the observatory", "examples": [ "My Observatory" ], "title": "Name", "type": "string" }, "latitude": { "description": "Latitude of the observatory", "examples": [ "46.8738", "46.8738 degree", "46:52:25.68 degree", "46d52m25.68s" ], "title": "Latitude", "type": "string" }, "longitude": { "description": "Longitude of the observatory", "examples": [ "-96.7678", "-96d46m04.08s", "263.2322 degree", "263d13m55.92s" ], "title": "Longitude", "type": "string" }, "elevation": { "description": "Elevation of the observatory", "examples": [ "1000 m", "1 km", "3.241e-14 pc", "1e12 nm" ], "title": "Elevation", "type": "string" }, "AAVSO_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "AAVSO code for observer", "title": "Aavso Code" }, "TESS_telescope_code": { "anyOf": [ { "type": "string" }, { "type": "null" } ], "default": null, "description": "Code for observatory used by TFOP SG01", "title": "Tess Telescope Code" } }, "required": [ "name", "latitude", "longitude", "elevation" ], "title": "Observatory", "type": "object" }, "PassbandMap": { "additionalProperties": false, "description": "Class to represent a mapping from one set of filter names to another that behaves like a `dict`.", "properties": { "name": { "description": "Name of the passband map", "examples": [ "Filter wheel 1" ], "title": "Name", "type": "string" }, "your_filter_names_to_aavso": { "items": { "$ref": "#/$defs/PassbandMapEntry" }, "title": "Your Filter Names To Aavso", "type": "array" } }, "required": [ "name", "your_filter_names_to_aavso" ], "title": "PassbandMap", "type": "object" }, "PassbandMapEntry": { "description": "A mapping from a single filter name to its corresponding AAVSO filter name.", "properties": { "your_filter_name": { "description": "Instrumental Filter Name", "title": "Your Filter Name", "type": "string" }, "aavso_filter_name": { "$ref": "#/$defs/AAVSOFilters", "title": "AAVSO Filter Name" } }, "required": [ "your_filter_name", "aavso_filter_name" ], "title": "PassbandMapEntry", "type": "object" }, "PhotometryApertures": { "additionalProperties": false, "description": "Settings for aperture photometry.", "properties": { "variable_aperture": { "default": false, "description": "Should the aperture be variable? If True, the aperture will be calculated from the average FWHM of the stars in each image.", "title": "Variable Aperture", "type": "boolean" }, "radius": { "autoui": "ipywidgets.BoundedFloatText", "default": 1, "description": "radius of circular aperture, in pixels or multiple of FWHM", "exclusiveMinimum": 0, "title": "Radius", "type": "number" }, "gap": { "autoui": "ipywidgets.BoundedFloatText", "default": 1, "description": "Size of gap between aperture and annulus, in pixels", "exclusiveMinimum": 0, "title": "Gap", "type": "number" }, "annulus_width": { "autoui": "ipywidgets.BoundedFloatText", "default": 1, "description": "distance between inner and outer radii of annulus in pixels", "exclusiveMinimum": 0, "title": "Annulus Width", "type": "number" }, "fwhm": { "default": 1.0, "description": "FWHM estimate in pixels", "disabled": true, "exclusiveMinimum": 0, "title": "FWHM estimate", "type": "number" } }, "title": "PhotometryApertures", "type": "object" }, "PhotometryOptionalSettings": { "additionalProperties": false, "description": "Options for performing photometry.", "properties": { "include_dig_noise": { "default": true, "description": "Should the digitization noise be included in the calculation of the noise for each observation?", "title": "Include Digitization Noise", "type": "boolean" }, "reject_too_close": { "default": true, "description": "Should sources that are too close each other be excluded from photometry?", "title": "Reject Too Close", "type": "boolean" }, "reject_background_outliers": { "default": true, "description": "Should extreme pixels in the annulus be rejected (e.g. from a star in the annulus)?", "title": "Reject Background Outliers", "type": "boolean" }, "fwhm_by_fit": { "$ref": "#/$defs/FwhmMethods", "default": "profile", "description": "Method for finding the FWHM of the star. 'fit' fits a 1D Gaussian to the star, 'profiile' fits a 1D Gaussian to the radial profile, and 'moments' uses second order moments of the image, which is terrible." }, "method": { "default": "exact", "description": "How to handle partial pixels in the aperture.", "enum": [ "exact", "center", "subpixel" ], "title": "Method", "type": "string" } }, "title": "PhotometryOptionalSettings", "type": "object" }, "SourceLocationSettings": { "additionalProperties": false, "description": "Settings for the location of the source list and the image files.", "properties": { "source_list_file": { "autoui": "ipyautoui.custom.FileChooser", "default": "source_locations.ecsv", "filter_pattern": [ "*.ecsv", "*.csv" ], "title": "Source List File", "type": "string" }, "use_coordinates": { "default": "sky", "description": "coordinates to use for locating sources in image", "enum": [ "sky", "pixel" ], "title": "Use Coordinates", "type": "string" }, "shift_tolerance": { "default": 5.0, "description": "Maximum shift between source position in list and in image, in pixels", "minimum": 0, "title": "Shift Tolerance", "type": "number" } }, "title": "SourceLocationSettings", "type": "object" } }, "additionalProperties": false, "description": "Settings for performing aperture photometry.", "properties": { "camera": { "$ref": "#/$defs/Camera", "show_null": true }, "observatory": { "$ref": "#/$defs/Observatory", "show_null": true }, "passband_map": { "anyOf": [ { "$ref": "#/$defs/PassbandMap" }, { "type": "null" } ], "description": "Class to represent a mapping from one set of filter names to another that behaves like a `dict`.", "show_null": true }, "photometry_apertures": { "$ref": "#/$defs/PhotometryApertures", "show_null": true }, "source_location_settings": { "$ref": "#/$defs/SourceLocationSettings", "show_null": true }, "photometry_optional_settings": { "$ref": "#/$defs/PhotometryOptionalSettings", "show_null": true }, "logging_settings": { "$ref": "#/$defs/LoggingSettings", "show_null": true } }, "required": [ "camera", "observatory", "passband_map", "photometry_apertures", "source_location_settings", "photometry_optional_settings", "logging_settings" ], "title": "PhotometrySettings", "type": "object" } | .. code-block:: Python import json from stellarphot.settings import photometry_settings_schema json_schema = json.dumps(photometry_settings_schema, indent=4) print(json_schema) .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.004 seconds) .. _sphx_glr_download_auto_examples_plot_schema.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: plot_schema.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: plot_schema.py ` .. container:: sphx-glr-download sphx-glr-download-zip :download:`Download zipped: plot_schema.zip ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_