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

add delta_wfe_around_time function #826

Merged

Conversation

mperrin
Copy link
Collaborator

@mperrin mperrin commented Apr 1, 2024

@obi-wan76 This is the function I mentioned briefly in slack. Written a while ago but I hadn't yet had a chance to PR it.

Given any date (or date and time, in the usual string format), this returns the delta OPD between the two measurements around that time. This should make it relatively easy to make plots of the drifts corresponding to the times when you think you detect strain sensor steps.

Screen Shot 2024-04-01 at 5 27 38 PM

@pep8speaks
Copy link

pep8speaks commented Apr 1, 2024

Hello @mperrin, Thank you for updating !

Line 32:21: E225 missing whitespace around operator
Line 32:27: E231 missing whitespace after ','

Line 20:1: E302 expected 2 blank lines, found 1
Line 30:1: E302 expected 2 blank lines, found 1
Line 33:88: E261 at least two spaces before inline comment
Line 36:33: E128 continuation line under-indented for visual indent
Line 87:15: E265 block comment should start with '# '
Line 89:15: E265 block comment should start with '# '
Line 90:15: E265 block comment should start with '# '
Line 96:15: E265 block comment should start with '# '
Line 105:56: E261 at least two spaces before inline comment
Line 131:25: E226 missing whitespace around arithmetic operator
Line 133:25: E226 missing whitespace around arithmetic operator
Line 138:47: E226 missing whitespace around arithmetic operator
Line 159:13: E265 block comment should start with '# '
Line 192:1: E303 too many blank lines (3)
Line 193:25: E127 continuation line over-indented for visual indent
Line 223:5: E303 too many blank lines (2)
Line 239:10: E225 missing whitespace around operator
Line 251:25: E712 comparison to False should be 'if cond is False:' or 'if not cond:'
Line 253:27: E712 comparison to True should be 'if cond is True:' or 'if cond:'
Line 260:73: E226 missing whitespace around arithmetic operator
Line 263:64: E231 missing whitespace after ','
Line 281:10: E221 multiple spaces before operator
Line 282:41: E231 missing whitespace after ','
Line 282:71: E251 unexpected spaces around keyword / parameter equals
Line 282:73: E251 unexpected spaces around keyword / parameter equals
Line 282:83: E231 missing whitespace after ':'
Line 284:12: E261 at least two spaces before inline comment
Line 284:13: E262 inline comment should start with '# '
Line 286:57: E226 missing whitespace around arithmetic operator
Line 291:24: E225 missing whitespace around operator
Line 300:26: E225 missing whitespace around operator
Line 301:34: E226 missing whitespace around arithmetic operator
Line 301:47: E225 missing whitespace around operator
Line 302:81: E226 missing whitespace around arithmetic operator
Line 304:26: E225 missing whitespace around operator
Line 305:17: E222 multiple spaces after operator
Line 305:36: E226 missing whitespace around arithmetic operator
Line 307:50: E226 missing whitespace around arithmetic operator
Line 309:23: E221 multiple spaces before operator
Line 311:18: E222 multiple spaces after operator
Line 311:24: E226 missing whitespace around arithmetic operator
Line 320:31: E226 missing whitespace around arithmetic operator
Line 320:35: E226 missing whitespace around arithmetic operator
Line 321:33: E226 missing whitespace around arithmetic operator
Line 325:31: E226 missing whitespace around arithmetic operator
Line 325:60: E226 missing whitespace around arithmetic operator
Line 328:11: E221 multiple spaces before operator
Line 334:22: E128 continuation line under-indented for visual indent
Line 339:60: E251 unexpected spaces around keyword / parameter equals
Line 339:62: E251 unexpected spaces around keyword / parameter equals
Line 341:10: E225 missing whitespace around operator
Line 343:23: E201 whitespace after '('
Line 343:43: E226 missing whitespace around arithmetic operator
Line 344:23: E201 whitespace after '('
Line 344:43: E226 missing whitespace around arithmetic operator
Line 347:22: E128 continuation line under-indented for visual indent
Line 349:44: E226 missing whitespace around arithmetic operator
Line 355:31: E226 missing whitespace around arithmetic operator
Line 355:111: E703 statement ends with a semicolon
Line 360:30: E226 missing whitespace around arithmetic operator
Line 365:24: E231 missing whitespace after ','
Line 371:37: E226 missing whitespace around arithmetic operator
Line 371:57: E226 missing whitespace around arithmetic operator
Line 372:30: E226 missing whitespace around arithmetic operator
Line 372:35: E226 missing whitespace around arithmetic operator
Line 372:41: E226 missing whitespace around arithmetic operator
Line 372:53: E226 missing whitespace around arithmetic operator
Line 373:22: E128 continuation line under-indented for visual indent
Line 374:21: E128 continuation line under-indented for visual indent
Line 377:5: E303 too many blank lines (2)
Line 381:50: E226 missing whitespace around arithmetic operator
Line 382:17: E225 missing whitespace around operator
Line 390:1: E266 too many leading '#' for block comment
Line 392:1: E302 expected 2 blank lines, found 1
Line 416:35: E226 missing whitespace around arithmetic operator
Line 428:35: E226 missing whitespace around arithmetic operator
Line 429:20: E128 continuation line under-indented for visual indent
Line 430:20: E128 continuation line under-indented for visual indent
Line 431:20: E128 continuation line under-indented for visual indent
Line 434:5: E303 too many blank lines (2)
Line 515:67: E225 missing whitespace around operator
Line 521:5: E303 too many blank lines (2)
Line 537:75: E231 missing whitespace after ':'
Line 537:81: E226 missing whitespace around arithmetic operator
Line 538:44: E225 missing whitespace around operator
Line 578:5: E303 too many blank lines (2)
Line 584:30: E225 missing whitespace around operator
Line 589:5: E266 too many leading '#' for block comment
Line 589:5: E303 too many blank lines (2)
Line 603:5: E266 too many leading '#' for block comment
Line 603:5: E303 too many blank lines (2)
Line 604:13: E225 missing whitespace around operator
Line 608:81: E226 missing whitespace around arithmetic operator
Line 613:102: E226 missing whitespace around arithmetic operator
Line 639:5: E266 too many leading '#' for block comment
Line 645:92: E226 missing whitespace around arithmetic operator
Line 650:91: E226 missing whitespace around arithmetic operator
Line 655:74: E226 missing whitespace around arithmetic operator
Line 660:70: E226 missing whitespace around arithmetic operator
Line 662:5: E266 too many leading '#' for block comment
Line 667:75: E226 missing whitespace around arithmetic operator
Line 672:66: E226 missing whitespace around arithmetic operator
Line 680:60: E225 missing whitespace around operator
Line 683:93: E226 missing whitespace around arithmetic operator
Line 688:5: E303 too many blank lines (2)
Line 690:78: E226 missing whitespace around arithmetic operator
Line 695:70: E226 missing whitespace around arithmetic operator
Line 743:5: E303 too many blank lines (2)
Line 764:1: E305 expected 2 blank lines after class or function definition, found 1
Line 819:19: E701 multiple statements on one line (colon)
Line 822:5: E303 too many blank lines (2)
Line 822:74: W504 line break after binary operator
Line 829:5: E266 too many leading '#' for block comment
Line 873:48: E226 missing whitespace around arithmetic operator
Line 913:49: W605 invalid escape sequence '\D'
Line 945:1: E266 too many leading '#' for block comment
Line 958:46: E241 multiple spaces after ','
Line 975:43: E203 whitespace before ':'
Line 990:1: E303 too many blank lines (3)
Line 1047:5: E303 too many blank lines (2)
Line 1050:47: E225 missing whitespace around operator
Line 1051:18: E221 multiple spaces before operator
Line 1053:70: E225 missing whitespace around operator
Line 1054:75: E202 whitespace before ']'
Line 1063:51: E261 at least two spaces before inline comment
Line 1063:51: E262 inline comment should start with '# '
Line 1064:41: E201 whitespace after '('
Line 1064:64: E202 whitespace before ')'
Line 1067:5: E722 do not use bare 'except'
Line 1088:5: E303 too many blank lines (2)
Line 1089:19: E701 multiple statements on one line (colon)
Line 1174:98: W504 line break after binary operator
Line 1199:49: E231 missing whitespace after ','
Line 1210:5: E266 too many leading '#' for block comment
Line 1222:5: E265 block comment should start with '# '
Line 1222:5: E303 too many blank lines (2)
Line 1223:5: E265 block comment should start with '# '
Line 1224:26: E201 whitespace after '('
Line 1225:30: E231 missing whitespace after ','
Line 1227:25: E226 missing whitespace around arithmetic operator
Line 1227:39: E226 missing whitespace around arithmetic operator
Line 1227:48: E226 missing whitespace around arithmetic operator
Line 1227:62: E226 missing whitespace around arithmetic operator
Line 1231:5: E266 too many leading '#' for block comment
Line 1242:60: E226 missing whitespace around arithmetic operator
Line 1242:71: E226 missing whitespace around arithmetic operator
Line 1242:88: E226 missing whitespace around arithmetic operator
Line 1242:94: E261 at least two spaces before inline comment
Line 1244:74: E226 missing whitespace around arithmetic operator
Line 1245:36: W605 invalid escape sequence '\D'
Line 1247:32: E226 missing whitespace around arithmetic operator
Line 1247:34: E226 missing whitespace around arithmetic operator
Line 1251:26: E201 whitespace after '('
Line 1259:5: E303 too many blank lines (2)
Line 1272:49: E226 missing whitespace around arithmetic operator
Line 1273:23: E225 missing whitespace around operator
Line 1273:32: E225 missing whitespace around operator
Line 1305:146: E226 missing whitespace around arithmetic operator
Line 1308:132: E226 missing whitespace around arithmetic operator
Line 1328:30: E261 at least two spaces before inline comment
Line 1330:134: E226 missing whitespace around arithmetic operator
Line 1333:132: E226 missing whitespace around arithmetic operator
Line 1341:22: E231 missing whitespace after ','
Line 1344:46: E251 unexpected spaces around keyword / parameter equals
Line 1344:48: E251 unexpected spaces around keyword / parameter equals
Line 1349:48: E226 missing whitespace around arithmetic operator
Line 1349:52: E226 missing whitespace around arithmetic operator
Line 1349:66: E226 missing whitespace around arithmetic operator
Line 1349:70: E226 missing whitespace around arithmetic operator
Line 1350:40: E128 continuation line under-indented for visual indent
Line 1380:5: E303 too many blank lines (2)
Line 1392:50: E226 missing whitespace around arithmetic operator
Line 1392:54: E226 missing whitespace around arithmetic operator
Line 1392:82: E226 missing whitespace around arithmetic operator
Line 1395:69: E226 missing whitespace around arithmetic operator
Line 1396:67: E231 missing whitespace after ','
Line 1398:69: E226 missing whitespace around arithmetic operator
Line 1399:67: E231 missing whitespace after ','
Line 1403:5: E303 too many blank lines (3)
Line 1404:41: E231 missing whitespace after ','
Line 1404:83: E231 missing whitespace after ':'
Line 1404:97: E231 missing whitespace after ':'
Line 1404:112: E231 missing whitespace after ':'
Line 1405:85: E231 missing whitespace after ':'
Line 1405:97: E231 missing whitespace after ':'
Line 1408:5: E303 too many blank lines (2)
Line 1408:11: E231 missing whitespace after ','
Line 1409:11: E231 missing whitespace after ','
Line 1411:11: E231 missing whitespace after ','
Line 1411:29: E226 missing whitespace around arithmetic operator
Line 1412:11: E231 missing whitespace after ','
Line 1412:29: E226 missing whitespace around arithmetic operator
Line 1414:11: E231 missing whitespace after ','
Line 1414:28: E226 missing whitespace around arithmetic operator
Line 1414:36: E226 missing whitespace around arithmetic operator
Line 1415:11: E231 missing whitespace after ','
Line 1415:28: E226 missing whitespace around arithmetic operator
Line 1415:36: E226 missing whitespace around arithmetic operator
Line 1418:5: E303 too many blank lines (2)
Line 1419:41: E226 missing whitespace around arithmetic operator
Line 1419:48: E226 missing whitespace around arithmetic operator
Line 1420:41: E226 missing whitespace around arithmetic operator
Line 1420:48: E226 missing whitespace around arithmetic operator
Line 1421:11: E231 missing whitespace after ','
Line 1421:22: E231 missing whitespace after ','
Line 1422:11: E231 missing whitespace after ','
Line 1422:22: E231 missing whitespace after ','
Line 1425:5: E303 too many blank lines (2)
Line 1425:11: E231 missing whitespace after ','
Line 1426:11: E231 missing whitespace after ','
Line 1427:11: E231 missing whitespace after ','
Line 1428:11: E231 missing whitespace after ','
Line 1429:11: E231 missing whitespace after ','
Line 1434:5: E303 too many blank lines (2)
Line 1435:26: E251 unexpected spaces around keyword / parameter equals
Line 1435:28: E251 unexpected spaces around keyword / parameter equals
Line 1435:35: E231 missing whitespace after ','
Line 1435:94: E202 whitespace before ')'
Line 1483:5: E303 too many blank lines (2)
Line 1488:51: E226 missing whitespace around arithmetic operator
Line 1488:55: E226 missing whitespace around arithmetic operator
Line 1488:84: E225 missing whitespace around operator
Line 1491:71: E226 missing whitespace around arithmetic operator
Line 1492:69: E231 missing whitespace after ','
Line 1494:71: E226 missing whitespace around arithmetic operator
Line 1495:69: E231 missing whitespace after ','
Line 1498:5: E303 too many blank lines (2)
Line 1499:41: E231 missing whitespace after ','
Line 1499:83: E231 missing whitespace after ':'
Line 1499:96: E231 missing whitespace after ':'
Line 1499:110: E231 missing whitespace after ':'
Line 1500:76: E128 continuation line under-indented for visual indent
Line 1500:84: E231 missing whitespace after ':'
Line 1500:96: E231 missing whitespace after ':'
Line 1503:5: E303 too many blank lines (2)
Line 1503:11: E231 missing whitespace after ','
Line 1504:11: E231 missing whitespace after ','
Line 1506:11: E231 missing whitespace after ','
Line 1506:29: E226 missing whitespace around arithmetic operator
Line 1507:11: E231 missing whitespace after ','
Line 1507:29: E226 missing whitespace around arithmetic operator
Line 1509:11: E231 missing whitespace after ','
Line 1509:29: E226 missing whitespace around arithmetic operator
Line 1509:38: E226 missing whitespace around arithmetic operator
Line 1510:11: E231 missing whitespace after ','
Line 1510:29: E226 missing whitespace around arithmetic operator
Line 1510:38: E226 missing whitespace around arithmetic operator
Line 1513:42: E226 missing whitespace around arithmetic operator
Line 1513:51: E226 missing whitespace around arithmetic operator
Line 1514:42: E226 missing whitespace around arithmetic operator
Line 1514:51: E226 missing whitespace around arithmetic operator
Line 1515:11: E231 missing whitespace after ','
Line 1515:21: E231 missing whitespace after ','
Line 1516:11: E231 missing whitespace after ','
Line 1516:21: E231 missing whitespace after ','
Line 1520:5: E303 too many blank lines (3)
Line 1520:11: E231 missing whitespace after ','
Line 1521:11: E231 missing whitespace after ','
Line 1522:11: E231 missing whitespace after ','
Line 1523:11: E231 missing whitespace after ','
Line 1524:11: E231 missing whitespace after ','
Line 1529:5: E303 too many blank lines (2)
Line 1530:26: E251 unexpected spaces around keyword / parameter equals
Line 1530:28: E251 unexpected spaces around keyword / parameter equals
Line 1530:35: E231 missing whitespace after ','
Line 1530:94: E202 whitespace before ')'
Line 1533:5: E303 too many blank lines (2)
Line 1555:5: E731 do not assign a lambda expression, use a def
Line 1558:19: E701 multiple statements on one line (colon)
Line 1562:16: E225 missing whitespace around operator
Line 1584:33: E231 missing whitespace after ','
Line 1586:85: E231 missing whitespace after ','
Line 1594:5: E303 too many blank lines (2)
Line 1596:18: E128 continuation line under-indented for visual indent
Line 1596:20: E231 missing whitespace after ','
Line 1596:22: E231 missing whitespace after ','
Line 1609:35: E231 missing whitespace after ','
Line 1612:15: E201 whitespace after '('
Line 1612:35: E226 missing whitespace around arithmetic operator
Line 1612:44: E226 missing whitespace around arithmetic operator
Line 1612:64: E226 missing whitespace around arithmetic operator
Line 1613:15: E128 continuation line under-indented for visual indent
Line 1614:14: E128 continuation line under-indented for visual indent
Line 1615:15: E201 whitespace after '('
Line 1615:24: E226 missing whitespace around arithmetic operator
Line 1615:43: E226 missing whitespace around arithmetic operator
Line 1615:52: E226 missing whitespace around arithmetic operator
Line 1616:15: E128 continuation line under-indented for visual indent
Line 1617:14: E128 continuation line under-indented for visual indent
Line 1622:20: E128 continuation line under-indented for visual indent
Line 1626:35: E226 missing whitespace around arithmetic operator
Line 1627:39: E226 missing whitespace around arithmetic operator
Line 1627:48: E226 missing whitespace around arithmetic operator
Line 1628:28: E226 missing whitespace around arithmetic operator
Line 1628:48: E226 missing whitespace around arithmetic operator
Line 1633:14: E128 continuation line under-indented for visual indent
Line 1636:5: E303 too many blank lines (2)
Line 1639:19: E225 missing whitespace around operator
Line 1642:9: E225 missing whitespace around operator
Line 1643:47: E226 missing whitespace around arithmetic operator
Line 1643:55: E226 missing whitespace around arithmetic operator
Line 1645:49: E226 missing whitespace around arithmetic operator
Line 1645:57: E226 missing whitespace around arithmetic operator
Line 1647:46: E226 missing whitespace around arithmetic operator
Line 1647:54: E226 missing whitespace around arithmetic operator
Line 1650:47: E226 missing whitespace around arithmetic operator
Line 1650:59: E226 missing whitespace around arithmetic operator
Line 1650:67: E226 missing whitespace around arithmetic operator
Line 1654:55: E251 unexpected spaces around keyword / parameter equals
Line 1654:57: E251 unexpected spaces around keyword / parameter equals
Line 1696:5: E303 too many blank lines (2)
Line 1699:57: E226 missing whitespace around arithmetic operator
Line 1699:64: E226 missing whitespace around arithmetic operator
Line 1705:19: E222 multiple spaces after operator
Line 1727:53: E226 missing whitespace around arithmetic operator
Line 1734:31: E225 missing whitespace around operator
Line 1740:5: E303 too many blank lines (2)
Line 1745:32: E226 missing whitespace around arithmetic operator
Line 1756:33: E225 missing whitespace around operator
Line 1757:51: E226 missing whitespace around arithmetic operator
Line 1761:42: E231 missing whitespace after ','
Line 1765:56: E231 missing whitespace after ','
Line 1770:28: E226 missing whitespace around arithmetic operator
Line 1770:87: E203 whitespace before ','
Line 1773:28: E231 missing whitespace after ','
Line 1774:25: E128 continuation line under-indented for visual indent
Line 1775:55: E226 missing whitespace around arithmetic operator
Line 1777:18: E231 missing whitespace after ','
Line 1821:25: W605 invalid escape sequence '\D'
Line 1829:1: E266 too many leading '#' for block comment
Line 1845:5: E303 too many blank lines (2)
Line 1845:52: E251 unexpected spaces around keyword / parameter equals
Line 1845:54: E251 unexpected spaces around keyword / parameter equals
Line 1845:59: E226 missing whitespace around arithmetic operator
Line 1845:77: E261 at least two spaces before inline comment
Line 1845:78: E262 inline comment should start with '# '
Line 1846:47: E226 missing whitespace around arithmetic operator
Line 1849:5: E303 too many blank lines (2)
Line 1858:5: E303 too many blank lines (2)
Line 1861:1: E302 expected 2 blank lines, found 1
Line 1872:41: E231 missing whitespace after ','
Line 1888:90: E231 missing whitespace after ','
Line 1896:43: E226 missing whitespace around arithmetic operator
Line 1902:22: E225 missing whitespace around operator
Line 1910:19: E126 continuation line over-indented for hanging indent
Line 1911:27: E251 unexpected spaces around keyword / parameter equals
Line 1911:29: E251 unexpected spaces around keyword / parameter equals
Line 1911:82: E225 missing whitespace around operator
Line 1915:21: E128 continuation line under-indented for visual indent
Line 1920:5: E303 too many blank lines (2)

Comment last updated at 2024-04-02 00:20:09 UTC

@mperrin mperrin requested a review from obi-wan76 April 1, 2024 21:29
@mperrin mperrin self-assigned this Apr 1, 2024
@mperrin mperrin added the JWST Affects JWST models in WebbPSF label Apr 1, 2024
Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.87%. Comparing base (2669f27) to head (229f978).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #826      +/-   ##
===========================================
+ Coverage    59.23%   59.87%   +0.64%     
===========================================
  Files           16       16              
  Lines         6839     6859      +20     
===========================================
+ Hits          4051     4107      +56     
+ Misses        2788     2752      -36     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@obi-wan76 obi-wan76 left a comment

Choose a reason for hiding this comment

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

This is great, thanks!

@obi-wan76 obi-wan76 merged commit be9aefb into spacetelescope:develop Apr 2, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JWST Affects JWST models in WebbPSF
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants