Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

39 add fuv dark monitors #73

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft

39 add fuv dark monitors #73

wants to merge 26 commits into from

Conversation

dzhuliya
Copy link
Collaborator

@dzhuliya dzhuliya commented Jun 6, 2019

Resolves #157
Resolves #39

@codecov
Copy link

codecov bot commented Feb 6, 2020

Codecov Report

Merging #73 (5f5ce5f) into master (5ad7ccb) will decrease coverage by 0.82%.
The diff coverage is 36.36%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
- Coverage   92.68%   91.85%   -0.83%     
==========================================
  Files          18       18              
  Lines        1476     1498      +22     
==========================================
+ Hits         1368     1376       +8     
- Misses        108      122      +14     
Impacted Files Coverage Δ
cosmo/monitors/data_models.py 68.04% <36.36%> (-9.30%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ad7ccb...5f5ce5f. Read the comment docs.

@dzhuliya
Copy link
Collaborator Author

feb 14th draft actually outputs a plot. I ran into issues with using find_files in the data models portion where I keep getting an empty dataframe. As a temporary fix, I am using what Camellia used in her NUV dark model. I'll work on that next

@dzhuliya
Copy link
Collaborator Author

I figured out the issue with the dark counts at zero! When creating an FUVA plot, data from FUVB was still being included but just set to zero?? I don't really know. But anyway, I put in a check for the correct segment in the get_data method and this resolved the issue.

@jwhite3
Copy link
Contributor

jwhite3 commented Feb 14, 2020

@dzhuliya Nice work! This is really great progress.

@jwhite3 jwhite3 added this to In progress in COSMO Overhaul via automation Feb 14, 2020
@jwhite3 jwhite3 added this to the Add Dark Monitors milestone Feb 14, 2020
@dzhuliya
Copy link
Collaborator Author

thanks! Setting subdir_pattern to None was all that it took and now find_files works for me again. I added the bottom monitor just to see what changes would need to be made for each region. Now I can probably work on just generalizing it? Since the only changes I need to make for each region monitor are the xcorr,ycorr values and which segment

@dzhuliya
Copy link
Collaborator Author

So now there are separate working monitors for each segment and region combo. But I think I am going to have to change how things are grouped if I want to have all the FUVA plots together on one page w/ buttons or something. I'll think about this some more...


location = (1060, 1260, 296, 734)
output = COS_MONITORING
docs = "https://spacetelescope.github.io/cosmo/monitors.html#fuv-dark-rate-monitors"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just remember to name the section like that when you write the documentation, otherwise the link won't work 😆

Comment on lines 87 to 156
class FUVALeftDarkMonitor(FUVDarkMonitor):
"""FUVA dark monitor for left edge"""
name = 'FUVA Dark Monitor - Left'
data_model = FUVDarkDataModel
segment = 'FUVA'
location = (1060, 1260, 296, 734)

def store_results(self):
# TODO: Define results to store
pass

def track(self):
# TODO: Define something to track
pass
class FUVATopDarkMonitor(FUVDarkMonitor):
"""FUVA dark monitor for top edge"""
name = 'FUVA Dark Monitor - Top'
data_model = FUVDarkDataModel
segment = 'FUVA'
location = (1060, 15250, 660, 734)


class FUVARightDarkMonitor(FUVDarkMonitor):
"""FUVA dark monitor for right edge"""
name = 'FUVA Dark Monitor - Right'
data_model = FUVDarkDataModel
segment = 'FUVA'
location = (15119, 15250, 296, 734)


class FUVAInnerDarkMonitor(FUVDarkMonitor):
"""FUVA dark monitor for inner region"""
name = 'FUVA Dark Monitor - Inner'
data_model = FUVDarkDataModel
segment = 'FUVA'
location = (1260, 15119, 375, 660)


class FUVBBottomDarkMonitor(FUVDarkMonitor):
"""FUVB dark monitor for bottom edge"""
name = 'FUVB Dark Monitor - Bottom'
data_model = FUVDarkDataModel
segment = 'FUVB'
location = (809, 15182, 360, 405)


class FUVBLeftDarkMonitor(FUVDarkMonitor):
"""FUVB dark monitor for left edge"""
name = 'FUVB Dark Monitor - Left'
data_model = FUVDarkDataModel
segment = 'FUVB'
location = (809, 1000, 360, 785)


class FUVBTopDarkMonitor(FUVDarkMonitor):
"""FUVB dark monitor for top edge"""
name = 'FUVB Dark Monitor - Top'
data_model = FUVDarkDataModel
segment = 'FUVB'
location = (809, 15182, 740, 785)


class FUVBRightDarkMonitor(FUVDarkMonitor):
"""FUVB dark monitor for right edge"""
name = 'FUVB Dark Monitor - Right'
data_model = FUVDarkDataModel
segment = 'FUVB'
location = (14990, 15182, 360, 785)


class FUVBInnerDarkMonitor(FUVDarkMonitor):
"""FUVB dark monitor for inner region"""
name = 'FUVB Dark Monitor - Inner'
data_model = FUVDarkDataModel
segment = 'FUVB'
location = (1000, 14990, 405, 740)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question of having individual monitors per "slice" is something that should probably be posed to whoever is providing science/instrumentation support to the monitors group. This is useful because it'd be trivial to run whichever ones of these that a user wants, and there can be customization on what's being tracked, plotted etc for the individual components, so on that front this is great.

However, if it turns out that the quantity being tracked is something that comes from the "overall" FUVA Dark and the only thing desired from the "slices" are the figures, then it'd make more sense to have the one monitor with complex plots.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
COSMO Overhaul
  
In progress
Development

Successfully merging this pull request may close these issues.

Create DataModel for Dark monitors Add FUV Dark monitors
2 participants