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

Built-in function for diffing ACA catalogs #349

Merged
merged 9 commits into from
Nov 30, 2020
Merged

Built-in function for diffing ACA catalogs #349

merged 9 commits into from
Nov 30, 2020

Conversation

taldcroft
Copy link
Member

@taldcroft taldcroft commented Nov 27, 2020

Description

Seems like this wheel gets re-invented a lot. I need this for the monitor window / full catalog validation so I decided to put this in as a new module in proseco.

Testing

  • No unit tests
  • Functional testing

I'm using this for the #346. For catalogs with a monitor request in 2020 it gives a result like this. (Flight catalogs on the left, new catalogs on the right): https://cxc.harvard.edu/mta/ASPECT/tmp/flight-aca-diff.html

EDIT: that HTML output is outdated. To see this in action try in Jupyter.

from proseco import get_aca_catalog
from proseco.tests.test_common import mod_std_info
from proseco.diff import catalog_diff

aca0 = get_aca_catalog(**mod_std_info(n_guide=5, n_fid=3),
                       include_ids_guide=[611192064])
aca1 = get_aca_catalog(**mod_std_info(n_guide=6, n_fid=2))
names = 'id type sz dim res halfw'
catalog_diff([aca0, aca1], [aca1, aca0], labels=['Obsid 1', 'Obsid 2'], style='html', names=names)

Note that in #346 I've given up on maintaining the same slot / index order. The existing order which is by mag, except for BOT stars where it is by AGASC ID, is just silly (and turned out to be rather difficult to replicate with MON stars in play). The new order is by mag within each category.

@taldcroft taldcroft changed the title WIP: built-in function for diffing ACA catalogs Built-in function for diffing ACA catalogs Nov 30, 2020
@taldcroft
Copy link
Member Author

I've tested this pretty thoroughly so merging now. If there are any changes that would come from review they can be done as a separate PR.

@taldcroft taldcroft merged commit 7b7fc1d into master Nov 30, 2020
@taldcroft taldcroft deleted the cat-diffs branch November 30, 2020 14:08
@javierggt javierggt mentioned this pull request Mar 2, 2021
@javierggt javierggt mentioned this pull request Apr 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant