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

Repo cleanup pretag #165

Merged
merged 6 commits into from
Jul 19, 2018
Merged

Repo cleanup pretag #165

merged 6 commits into from
Jul 19, 2018

Conversation

nkern
Copy link
Member

@nkern nkern commented Jul 19, 2018

A few minor changes addressing issues in UVPSpec and PSpecData before we tag a release

@ghost ghost assigned nkern Jul 19, 2018
@ghost ghost added the in progress label Jul 19, 2018
@nkern
Copy link
Member Author

nkern commented Jul 19, 2018

still working on one last edit...

@coveralls
Copy link

coveralls commented Jul 19, 2018

Coverage Status

Coverage decreased (-0.1%) to 96.164% when pulling e60d8a0 on repo_cleanup_pretag into 5172e1c on master.

@nkern nkern requested a review from philbull July 19, 2018 04:32
Copy link
Collaborator

@philbull philbull left a comment

Choose a reason for hiding this comment

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

Looks good, I only have very minor queries. Good to merge.

Y = np.vstack([self.Y(key1).diagonal(), self.Y(key2).diagonal()])

# Second: check cache for Y
matches = [np.isclose(Y, y).all() for y in self._identity_Y.values()]
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is probably fine, but an alternative would be to hash the array using md5sum.

@@ -241,6 +242,10 @@ def _blpair_to_antnums(blpair):
ant2 = int(np.floor(blpair / 1e6 - ant1*1e3))
ant3 = int(np.floor(blpair / 1e3 - ant1*1e6 - ant2*1e3))
ant4 = int(np.floor(blpair - ant1*1e9 - ant2*1e6 - ant3*1e3))
ant1 -= 100
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why are these on separate lines? They could just be put into the lines above.

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so, see how ant2 is dependent on ant1 and so on..

Copy link
Collaborator

Choose a reason for hiding this comment

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

Oops, my bad.

Gv = self.get_G(key1, key2)
Hv = self.get_H(key1, key2, sampling=sampling)
# cache it
self._identity_Y[(key1, key2)] = Y
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just for clarity: This is done per baseline-pair, and not per blpair-time? So the flags still have to remain time-independent?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, done per-baselinepair (not time). flags still need to remain time-independent

@nkern nkern merged commit ac062da into master Jul 19, 2018
@ghost ghost removed the in progress label Jul 19, 2018
@nkern nkern deleted the repo_cleanup_pretag branch July 19, 2018 11:42
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.

None yet

3 participants