Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
kecnry committed Jul 12, 2024
1 parent 1fc3fb5 commit 05c4f04
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions lcviz/plugins/photometric_extraction/photometric_extraction.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@

from jdaviz.core.registries import tray_registry
from jdaviz.configs.cubeviz.plugins import SpectralExtraction
from jdaviz.core.template_mixin import (PluginTemplateMixin,
DatasetSelectMixin, AddResultsMixin,
skip_if_no_updates_since_last_active,
with_spinner, with_temp_disable)
from jdaviz.core.user_api import PluginUserApi


Expand Down Expand Up @@ -36,10 +32,9 @@ class PhotometricExtraction(SpectralExtraction):

def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#photometric-extraction"
self.docs_link = f"https://lcviz.readthedocs.io/en/{self.vdocs}/plugins.html#photometric-extraction" # noqa
self.docs_description = "Extract light curve from target pixel file cube." # noqa


def is_tpf(data):
return len(data.shape) == 3
self.dataset.filters = [is_tpf]
Expand All @@ -48,7 +43,7 @@ def is_tpf(data):
@property
def user_api(self):
expose = ['dataset', 'function', 'aperture',
'background',
'background',
'add_results', 'extract',
'aperture_method']

Expand All @@ -75,7 +70,8 @@ def _return_extracted(self, cube, wcs, collapsed_nddata):
return lc

Check warning on line 70 in lcviz/plugins/photometric_extraction/photometric_extraction.py

View check run for this annotation

Codecov / codecov/patch

lcviz/plugins/photometric_extraction/photometric_extraction.py#L69-L70

Added lines #L69 - L70 were not covered by tests

def _preview_x_from_extracted(self, extracted):
return extracted.time.value - self.dataset.selected_obj.meta.get('reference_time', 0.0 * u.d).value
return extracted.time.value - self.dataset.selected_obj.meta.get('reference_time',

Check warning on line 73 in lcviz/plugins/photometric_extraction/photometric_extraction.py

View check run for this annotation

Codecov / codecov/patch

lcviz/plugins/photometric_extraction/photometric_extraction.py#L73

Added line #L73 was not covered by tests
0.0 * u.d).value

def _preview_y_from_extracted(self, extracted):
return extracted.flux.value

Check warning on line 77 in lcviz/plugins/photometric_extraction/photometric_extraction.py

View check run for this annotation

Codecov / codecov/patch

lcviz/plugins/photometric_extraction/photometric_extraction.py#L77

Added line #L77 was not covered by tests

0 comments on commit 05c4f04

Please sign in to comment.