Skip to content

Commit

Permalink
Try using new models
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcraig committed Aug 10, 2023
1 parent 1219e7c commit 54898cb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions stellarphot/gui_tools/seeing_profile_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
from stellarphot.io import TessSubmission
from stellarphot.gui_tools.fits_opener import FitsOpener
from stellarphot.plotting import seeing_plot
from stellarphot.settings.views import ui_generator
from stellarphot.settings.models import ApertureSettings

__all__ = ['set_keybindings', 'find_center', 'radial_profile',
'RadialProfile', 'box', 'SeeingProfileWidget']
Expand Down Expand Up @@ -160,7 +162,7 @@ def find_center(image, center_guess, cutout_size=30, max_iters=10):
return cen


# TODO: Why eactly is this separate from the class RadialProfile?
# TODO: Why exactly is this separate from the class RadialProfile?
def radial_profile(data, center, size=30, return_scaled=True):
"""
Construct a radial profile of a chunk of width ``size`` centered
Expand Down Expand Up @@ -465,11 +467,12 @@ def __init__(self, imagewidget=None, width=500):
big_box = ipw.GridspecLayout(1, 2)
layout = ipw.Layout(width='20ch')
hb = ipw.HBox()
self.aperture_settings = ui_generator(ApertureSettings)
self.ap_t = ipw.IntText(description='Aperture radius', value=5, layout=layout, style=desc_style)
self.in_t = ipw.IntText(description='Inner annulus', value=10, layout=layout, style=desc_style)
self.out_t = ipw.IntText(description='Outer annulus', value=20, layout=layout, style=desc_style)
self.save_aps = ipw.Button(description="Save settings")
hb.children = [self.ap_t, self.save_aps] #, self.in_t, self.out_t]
hb.children = [self.aperture_settings] #, self.save_aps] #, self.in_t, self.out_t]

lil_box = ipw.VBox()
lil_tabs = ipw.Tab()
Expand Down Expand Up @@ -705,4 +708,3 @@ def show_event(viewer, event=None, datax=None, datay=None, aperture=None):
plt.grid()
plt.show()
return show_event

0 comments on commit 54898cb

Please sign in to comment.