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

Allow scattering code to trigger omega scans #291

Merged
merged 13 commits into from
Apr 3, 2019

Conversation

alurban
Copy link
Member

@alurban alurban commented Apr 1, 2019

This PR adds an option --omega-scans, whose argument is an integer, to gwdetchar-scattering. When --omega-scans N is nonzero, a random sample of N triggers that fall within active scattering segments is chosen to omega scan, with jobs launched in batch mode and displayed on the scattering page.

This PR also refactors the heavy lifting in gwdetchar-omega-batch into a new submodule, gwdetchar.omega.batch, including unit tests.

Test output is available here (requires LIGO.ORG credentials).

This fixes #287.

cc @duncanmmacleod, @siddharth101

@coveralls
Copy link

coveralls commented Apr 1, 2019

Coverage Status

Coverage increased (+0.2%) to 95.512% when pulling f1ca592 on alurban:scat-omega into 9baa9d5 on gwdetchar:master.

@siddharth101
Copy link
Contributor

Thanks a lot @alurban . This looks pretty good.

Copy link
Member

@duncanmmacleod duncanmmacleod left a comment

Choose a reason for hiding this comment

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

One actual change, but more generally, can (and should) this block be moved into a function, to make it more modular, and unit-testtable.

bin/gwdetchar-scattering Outdated Show resolved Hide resolved
@alurban
Copy link
Member Author

alurban commented Apr 2, 2019

@duncanmmacleod, that's probably a good idea, since there are now three tools (gwdetchar-omega-batch, gwdetchar-scattering, and hveto) that launch omega scans to condor. I'll have a go at that after I get back from lunch.

@alurban alurban force-pushed the scat-omega branch 5 times, most recently from 2d46d29 to 24023fe Compare April 3, 2019 00:34
@alurban
Copy link
Member Author

alurban commented Apr 3, 2019

@duncanmmacleod, at the risk of scope creep, I've refactored the heavy-lifting parts of gwdetchar-omega-batch into a new module called gwdetchar.omega.batch and used this to launch omega scans from gwdetchar-scattering. This change includes unit tests for the new submodule.

Once it's released, we will also be able to use this to clean up similar functionality in hveto. I particularly like this because it removes a call to subprocess, it gives me the warm-and-fuzzies when we can do everything in memory.

@alurban alurban changed the title Allow scattering code to trigger omega scans WIP: Allow scattering code to trigger omega scans Apr 3, 2019
@alurban alurban changed the title WIP: Allow scattering code to trigger omega scans Allow scattering code to trigger omega scans Apr 3, 2019
Copy link
Member

@duncanmmacleod duncanmmacleod left a comment

Choose a reason for hiding this comment

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

Looks like a great change, just one small thing to address.

times = [1126259462]
channel = 'X1:STRAIN'
page = html.scaffold_omega_scans(times, channel)
print(page)
Copy link
Member

Choose a reason for hiding this comment

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

Can this be removed?

Copy link
Member Author

Choose a reason for hiding this comment

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

thanks @duncanmmacleod, I've removed it, this was left over from when I was writing the unit test and hadn't woken up enough yet

Copy link
Member

@duncanmmacleod duncanmmacleod left a comment

Choose a reason for hiding this comment

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

LGTM.

@alurban alurban merged commit 5ef647c into gwdetchar:master Apr 3, 2019
@alurban alurban deleted the scat-omega branch April 3, 2019 17:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Omega scans for gwdetchar-scattering
4 participants