jeffctaylor / astro2013

A centralized place for my code this spring and summer
2 stars 0 forks source link

registration debugging #18

Closed sophiathl closed 11 years ago

sophiathl commented 11 years ago

1st. If the pixelscale of the reference image is larger than the user-input angular size, then reproject() runs into error (1 pixel to deal with)

Solution: perform a check between the angular size given by the user, and the pixelscale of the reference image. If the former is smaller than the latter, then the procedure is halted, an error message appears, and the user should either correct the angular_size input value, or choose another reference image with angular_size > pixelscale.

2nd. If the user-input angular size is larger than the field of view of the reference image, then the registration is not properly done

Current solution: add the argument "exact_size=True" in the reproject() Note: if the f-o-v- is a lot smaller than the user-input angular_size, then it will pad with NANs the extra field. We, thus, perform a check to see if angular_size > f-o-v, and if this is indeed the case, a warning is given to the user (to bear in mind for the convolution).

jeffctaylor commented 11 years ago

I have resolved the first part of this issue (the fix has already been pushed to the durga2112/imagecube repository). I'm not sure how to approach the second part, though - specifically, how can we determine the field of view of the reference image?

sophiathl commented 11 years ago

short explanation - for each input (or reference) image the f-o-v can be estimated (rough estimate) using the NAXIS1 and the pixel scale: f-o-v = NAXIS1 * CDELT1

sophiathl commented 11 years ago

I forgot, that has the same units as the CDELT1

jeffctaylor commented 11 years ago

Is NAXIS1 a keyword that we can reasonably expect to be present, or should we add that to the list of required keywords in the usage message?

sophiathl commented 11 years ago

we can reasonably epxect to be present - check when you create a fits header alone, or when you create the fake images header. i will explain shortly in person if it doesn't make sense as written.

sophiathl commented 11 years ago

let's check that this is satisfied, and see what bugs are fixed: pixelscale(i) < ang_size < f-o-v(i)

This will enable for images that satisfy this criterion to proceed with processing, and thus not halt the procedure

Some debugging is epxected

jeffctaylor commented 11 years ago

The suggestion from the latest comment has now been implemented in durga2112/imagecube.