Data Analysis Plugins#
Metadata Viewer#
This plugin allows viewing of any metadata associated with the selected data.
User API Example
See the MetadataViewer
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
metadata = lcviz.plugins['Metadata']
print(f"dataset choices: {metadata.dataset.choices}")
metadata.dataset = metadata.dataset.choices[0]
print(metadata.metadata)
See also
- Jdaviz Metadata Viewer
Jdaviz documentation on the Metadata Viewer plugin.
Flux Column#
This plugin allows choosing which column in the underlying data should be used as the flux column (origin) throughout the app (when plotting and in any data analysis plugins).
User API Example
See the FluxColumn
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
flux_col = lcviz.plugins['Flux Column']
print(flux_col.flux_column.choices)
flux_col.flux_column = 'sap_flux'
See also
This plugin reproduces the behavior also available in lightkurve
as:
Plot Options#
This plugin gives access to per-viewer and per-layer plotting options.
User API Example
See the PlotOptions
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
po = lcviz.plugins['Plot Options']
print(f"viewer choices: {po.viewer.choices}")
po.viewer = po.viewer.choices[0]
print(f"layer choices: {po.layer.choices}")
po.layer = po.layer.choices[0]
po.marker_size = 4
po.marker_color = 'blue'
See also
- Jdaviz Plot Options
Jdaviz documentation on the Plot Options plugin.
Subset Tools#
This plugin allows viewing and modifying defined subsets.
User API Example
See the SubsetPlugin
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
subset_tools = lcviz.plugins['Subset Tools']
subset_tools.open_in_tray()
See also
- Jdaviz Subset Tools
Jdaviz documentation on the Subset Tools plugin.
Markers#
This plugin allows for interactively creating markers in any viewer and logging information about the location of that marker along with the applicable data and viewer labels into a table.
With the plugin open in the tray, mouse over any viewer and press the “m” key to log the information displayed in the app toolbar into the table. The markers remain at that fixed pixel-position in the viewer they were created (regardless of changes to the underlying data or linking) and are only visible when the plugin is opened.
User API Example
See the Markers
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
markers = lcviz.plugins['Markers']
markers.open_in_tray()
# interactively mark by mousing over the viewer and pressing "M"
table = markers.export_table()
print(table)
markers.clear_table()
See also
- Jdaviz Markers
Jdaviz documentation on the Markers plugin.
Flatten#
This plugin allows for flattening the light curve by removing trends. By default, the resulting flattened light curve is “unnormalized” by multiplying the flattened light curve by the median of the trend, but this can be disabled through the plugin settings.
User API Example
See the Flatten
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
flatten = lcviz.plugins['Flatten']
flatten.open_in_tray()
flatten.polyorder = 4
flattened_lc = flatten.flatten(add_data=True)
print(flattened_lc)
Frequency Analysis#
This plugin exposes the periodogram (in period or frequency space) for an input light curve.
User API Example
See the FrequencyAnalysis
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
freq = lcviz.plugins['Frequency Analysis']
freq.open_in_tray()
freq.method = 'Lomb-Scargle'
freq.xunit = 'period'
periodogram = freq.periodogram
print(periodogram)
See also
This plugin uses the following lightkurve
implementations:
Ephemeris#
The ephemeris plugin allows for setting, finding, and refining the ephemeris or ephemerides used for phase-folding.
User API Example
See the Ephemeris
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
ephem = lcviz.plugins['Ephemeris']
ephem.period = 4.88780258
ephem.t0 = 2.43
ephem.rename_component('default', 'my component name')
Binning#
This plugin supports binning a light curve in time or phase-space.
User API Example
See the Binning
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
binning = lcviz.plugins['Binning']
binning.n_bins = 150
binned_lc = binning.bin(add_data=True)
print(binned_lc)
Export#
This plugin allows exporting the plot in a given viewer to various image formats.
User API Example
See the Export
user API documentation for more details.
from lcviz import LCviz
lc = search_lightcurve("HAT-P-11", mission="Kepler",
cadence="long", quarter=10).download().flatten()
lcviz = LCviz()
lcviz.load_data(lc)
lcviz.show()
export = lcviz.plugins['Export']
export.export('test.png')
See also
- Jdaviz Export Plot
Jdaviz documentation on the Export plugin.