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

few edits on conviqt.py #346

Closed
wants to merge 2 commits into from
Closed

few edits on conviqt.py #346

wants to merge 2 commits into from

Conversation

giuspugl
Copy link
Contributor

@giuspugl giuspugl commented May 8, 2020

Opening a new PR to allow editing suggestions

beam_file_i00 = beam_file.replace(".fits", "_I000.fits")
beam_file_0i0 = beam_file.replace(".fits", "_0I00.fits")
beam_file_00i = beam_file.replace(".fits", "_00I0.fits")
beam_file_i00= beam_file.replace('.fits', '_I000.fits')
Copy link
Member

Choose a reason for hiding this comment

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

Why these changes? black will revert them back immediately and they clutter the review. It would be helpful to format the source before committing.

beam0I0 = self.get_beam(beam_file_0i0, det, verbose)
beam00I = self.get_beam(beam_file_00i, det, verbose)

beamI00 =self.get_beam(beam_file_i00, det,verbose )
Copy link
Member

Choose a reason for hiding this comment

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

Same comment about formatting.

psitot = psipol + 2 * hwpang

# I-beam convolution
pnt = self.get_buffer(theta, phi, psi , det, verbose)
Copy link
Member

Choose a reason for hiding this comment

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

Instead of get_buffer(theta, phi, psi, ..) try get_buffer(theta, phi, psi - psipol, ...)

Copy link
Member

Choose a reason for hiding this comment

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

sorry, not psipol but psitot to include the HWP

pnt = self.get_buffer(theta, phi, psi , det, verbose)
convolved_data = self.convolve(sky, beamI00, detector, pnt, det, verbose)
# Q-beam convolution
pnt = self.get_buffer(theta, phi, psi, det, verbose)
Copy link
Member

Choose a reason for hiding this comment

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

psi -> psi - psipol

# Q-beam convolution
pnt = self.get_buffer(theta, phi, psi, det, verbose)
convolved_data += np.cos(2*psitot ) * self.convolve(sky, beam0I0, detector, pnt, det, verbose)
# U-beam convolution
pnt = self.get_buffer(theta, phi, psi, det, verbose)
Copy link
Member

Choose a reason for hiding this comment

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

psi -> psi-psipol

return np.hstack (all_hwpang )


def _get_psipol(self, data, det):
Copy link
Member

Choose a reason for hiding this comment

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

This implementation will fail if the detector in question is not available in all observations. Please see how get_pointing avoids this issue.

@keskitalo
Copy link
Member

This PR is superseded by #347

@keskitalo keskitalo mentioned this pull request May 11, 2020
@keskitalo
Copy link
Member

Closing this PR in favor of #347

@keskitalo keskitalo closed this May 11, 2020
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.

2 participants