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

fixed some astropy stats issues #15

Merged
merged 5 commits into from
Jul 16, 2020

Conversation

followthesheep
Copy link
Contributor

It looks like calib.py was not importing astropy stats. Also astropy stats does not support the maxiters keyword in the version of astropy (2.0) that works with pyraf and astroconda?

@jluastro
Copy link
Owner

jluastro commented Jun 10, 2020 via email

@followthesheep
Copy link
Contributor Author

followthesheep commented Jun 10, 2020 via email

@followthesheep
Copy link
Contributor Author

  • bug in calling dar and distortion correction which did not pass the correct instruement keyword
  • the CENWAVE keyword does not exist in osiris headers
  • filter names have the aperture attached. Need to parse
  • strehl calculator has issues
  • combo images have problems with the submaps - the names of the masks are too long. Needed to use the same trick as in the main combo map to have shorter names. Very tricky to implement this and still work with pyfits -- probably need some sort of translator in the future.

Copy link
Owner

@jluastro jluastro 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.

@jluastro
Copy link
Owner

I'll note that we tested thoroughly last summer only through the clean step (to derive distortion solutions). So I think combo might still have other issues too. We need to confirm that all the DAR keywords are correct (most importantly the angles).

@followthesheep
Copy link
Contributor Author

Sorry, didn't realize my previous pull request never got merged. This commit is not ready for a pull request

fits.setval(new_file, 'CAMNAME', value = 'narrow') # from NIRC2

return

Copy link
Owner

Choose a reason for hiding this comment

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

I am replacing this with a generic flip code that works in either direction and uses the date to figure out which way to flip.

@@ -145,6 +145,9 @@ def clean(files, nite, wave, refSrc, strSrc, badColumns=None, field=None,
radecRef = [float(hdr1['RA']), float(hdr1['DEC'])]
aotsxyRef = nirc2_util.getAotsxy(hdr1)

if instrument.name == 'OSIRIS':
Copy link
Owner

Choose a reason for hiding this comment

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

I think we should move this to the instrument. I think each instrument will need to know how to calculate its own offsets, right?

@@ -433,7 +436,17 @@ def combine(files, wave, outroot, field=None, outSuffix=None,
##########

# Load the strehl_source.txt file
strehls, fwhm = loadStrehl(cleanDir, roots)
if (weight is not None) or os.path.exists(os.path.join(cleanDir,'strehl_source.txt')):
Copy link
Owner

Choose a reason for hiding this comment

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

The weights=None is a great addition. I think in the case that no file exists, we should probably throw and exception and let the user know.

@jluastro jluastro merged commit 0fd3e19 into jluastro:osiris_img Jul 16, 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