WCS alignment

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

WCS alignment

rkohrs
First...I love this program.  For the first time, my high school astronomy students (in a mac environment where X11 is not allowed) will be able to do some great image processing.

Here's my difficulty, however.  I am trying to develop a lesson where students take images from a radio telescope at Green Bank (the 20m) and align them with optical images from optical SKYNET.  All images are in FITS format and have WCS solutions.  

Can I use the WCS to align these multi-wavelength images?  If so, how?
Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

karenacollins
Administrator
Hi Russ,
     Thanks for the nice comments. The short answer to your question is unfortunately no at this time. However, I do plan to offer this feature in the near term. Do you need a solution right away or do we have some time? We currently only support TAN and SIN WCS projections (with or without SIP distortion corrections), although we will eventually add support for all projections defined in the FITS WCS spec. Different projections are relatively easy to add as long as I have some sample images with the appropriate WCS headers for testing. Could you work with a limited number of projections initially? If so, which projections would be required to get started and could you provide a sample image with each projection? We could do the file exchange outside this forum if desired.
Karen
On 2/4/2013 2:43 PM, Russ [via AstroImageJ] wrote:
First...I love this program.  For the first time, my high school astronomy students (in a mac environment where X11 is not allowed) will be able to do some great image processing.

Here's my difficulty, however.  I am trying to develop a lesson where students take images from a radio telescope at Green Bank (the 20m) and align them with optical images from optical SKYNET.  All images are in FITS format and have WCS solutions.  

Can I use the WCS to align these multi-wavelength images?  If so, how?


If you reply to this email, your message will be added to the discussion below:
http://astroimagej.1065399.n5.nabble.com/WCS-alignment-tp19.html
To start a new topic under AstroImageJ, email [hidden email]
To unsubscribe from AstroImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

rkohrs
"karenacollins [via AstroImageJ]" <[hidden email]>
writes:

>Hi Russ,
>     Thanks for the nice comments. The short answer to your question is
>unfortunately no at this time. However, I do plan to offer this feature
>in the near term. Do you need a solution right away or do we have some
>time? We currently only support TAN and SIN WCS projections (with or
>without SIP distortion corrections), although we will eventually add
>support for all projections defined in the FITS WCS spec. Different
>projections are relatively easy to add as long as I have some sample
>images with the appropriate WCS headers for testing. Could you work with
>a limited number of projections initially? If so, which projections would
>be required to get started and could you provide a sample image with each
>projection? We could do the file exchange outside this forum if desired.
Hi Karen,

Thanks for the answer.  In response, I'd have to say that I'm not entirely
sure about the projections you are referring to.  I"m relatively new to
WCS.  I had hoped to do this with students prior to the end of the school
year, but we can certainly just do some optical image manipulation in
place of doing any multi-wavelength overlays.  

Actually, here is the link to the radio data collected for M42 by the 20m.
 http://www.gb.nrao.edu/20m/peak/M42/Skynet_56260_M42_4880_3D.htm

You'll see two links for FITS data, FITS L and FITS R, which correspond to
left and right polarization.  This is an example of the radio data that
I'm working with.  If you click on "Log", there are also links for Orion-A
or M42 that would be really interesting candidates for overlays.  Perhaps
you can see what you need in the header information?

Here is an example of the header information from on image of M42 on the
optical side:

Header listing for HDU #1:
SIMPLE  =                    T
BITPIX  =                   16 /8 unsigned int, 16 & 32 int, -32 & -64 real
NAXIS   =                    2 /number of axes
NAXIS1  =                 1024 /fastest changing axis
NAXIS2  =                 1024 /next to fastest changing axis
BSCALE  =   1.0000000000000000 /physical = BZERO + BSCALE*array_value
BZERO   =   32768.000000000000 /physical = BZERO + BSCALE*array_value
OBJECT  = '        '
TELESCOP= '        ' /          telescope used to acquire this image
INSTRUME= 'Apogee Alta'
OBSERVER= 'greenbank'          / Skynet user who submitted observation
NOTES   = '        '
DATE-OBS= '2013-01-04T03:19:30' /YYYY-MM-DDThh:mm:ss observation start, UT
EXPTIME =   20.000000000000000 /Exposure time in seconds
EXPOSURE=   20.000000000000000 /Exposure time in seconds
SET-TEMP=  -20.000000000000000 /CCD temperature setpoint in C
CCD-TEMP=  -20.163948750000003 /CCD temperature at start of exposure in C
XPIXSZ  =   13.000000000000002 /Pixel Width in microns (after binning)
YPIXSZ  =   13.000000000000002 /Pixel Height in microns (after binning)
XBINNING=                    1 /Binning factor in width
YBINNING=                    1 /Binning factor in height
XORGSUBF=                    0 /Subframe X position in binned pixels
YORGSUBF=                    0 /Subframe Y position in binned pixels
FILTER  = 'Red     ' /          Filter used when taking image
IMAGETYP= 'Light Frame' /       Type of image
FOCALLEN=   4565.0000000000000 /Focal length of telescope in mm
APTDIA  =  0.00000000000000000 /Aperture diameter of telescope in mm
APTAREA =  0.00000000000000000 /Aperture area of telescope in mm^2
SWCREATE= 'MaxIm DL Version 4.60' /Name of software that created the image
SBSTDVER= 'SBFITSEXT Version 1.0' /Version of SBFITSEXT standard in effect
FLIPSTAT= 'Mirror  '
SWOWNER = 'Jack Harvey' /       Licensed owner of software
LATITUDE=      -0.526523656536 / Latitude in radians; negative = south
LONGITUD=      -1.235786194639 / Longitude in radians; negative = west
RA      = '05:35:17.3'         / Target Right Ascension, J2000
DEC     = '-05:23:27.202'      / Declination of target, J2000
TELRA   = '05:35:17.3'         / Right Ascension reported by telescope,
J2000
TELDEC  = '-05:23:27.202'      / Declination reported by telescope, J2000
OBJRA   = '05:35:17.3'         / Right Ascension of object, J2000
OBJDEC  = '-05:23:27.202'      / Declination of object
EPOCH   =                2000. / Epoch of coordinates
JD      =     2456296.63851207 / Julian day at start of exposure
SWVER   = 'Terminator - 2011.12.12' / Software used for telescope control
LST     = '05:31:50.3'         / Local sidereal time at start of exposure
HA      =  -0.0575049437091006 / Hour angle at exp start; neg = east of
meridian
SITEELEV=                7000. / Site elevation, meters
SECPIX  =                 0.59 / Image scale, arcsec per pixel
OBSERVAT= 'Prompt3 '           / Name of observatory or telescope
ZA      =     24.7900257064464 / Zenith angle at start of exposure, degrees
AIRMASS =     1.10128809772641 / Airmass at start of exposure
AZIMUTH = '+02:25:37.804'      / Azimuth in degrees; 0 = North, 90 = east
ELEVATIO= '+65:11:49.151'      / Target elevation in degrees; 0 = horizon,
90 =
DATE    = '2013-01-04'         / Date at start of exposure, UT
TIME-OBS= '03:19:27.443'       / Time at start of observation, UT
FOCUSPOS=                 1601 / Position of focus motor
SUNELEV =    -32.9954819008038 / Sun elevation, degrees
OBSID   =               696448 / Skynet observation ID
EXPID   =              7728814 / Skynet exposure ID
GRBID   =                   -1 / Skynet GRB ID
LATSTR  = '-30:10:3.300'       / Telescope latitude string; negative =
south
LONGSTR = '-70:48:19.200'      / Telescope longitude string; negative =
west
END

These data are publicly available, so I don't mind discussing them here
for now.

Dum spiro spero,

Russ Kohrs

A Husband and Father
Who teaches Geology and Astronomy...
Who insists that every rock can tell a story...
Who is transfixed by seemingly esoteric astrophysical concepts...
Who thinks of white-washed buildings and gold mosaics when he eats any
olive...
Who loves chili, particularly with pasta, hot sauce, onions, and copious
amounts of cheese...
And who would be happy to play bagpipes for your event!
http://www.wix.com/rkohrs/shenandoahpiper

You will certainly not doubt the necessity of studying astronomy and
physics, if you are desirous of comprehending the relation between the
world and Providence as it is in reality, and not according to imagination.

-- Maimonides

Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

karenacollins
Administrator
Hi Russ,
    Thanks for the information. The radio image uses SIN projection for RA and DEC (see CTYPE1 and CTYPE2 in the header) so we are good there. However, the it has 4 axes (RA, DEC, FREQ, STOKES) and AIJ can currently only deal with 2 axes (RA and DEC). The best possibility here is that I might be able (not sure) to ignore the FREQ and STOKES axes if you are not using those.
    I don't see any WCS info in the header for the optical image header you sent. It looks like the image was written by MaximDL, and I don't see the usual headers that MaximDL adds after a "plate solve" has been ran on the image. I believe Maxim uses a program called pinpoint to do do the plate solve work.
    Do you have an installation of DS9 available to you? If so, when you open the optical image in DS9, do you see RA and DEC displayed in the "alpha" and "delta" boxes above the image? If so, that means I am missing something in the header. If you do see RA and DEC in DS9 (or don't have access to DS9), I would like to get a copy of this image for testing if possible.
    By the way, what is your end goal after alignment? Do you intend to build an RGB color image from 3 different images?
Karen
On 2/4/2013 4:52 PM, rkohrs [via AstroImageJ] wrote:
"karenacollins [via AstroImageJ]" <[hidden email]>
writes:

>Hi Russ,
>     Thanks for the nice comments. The short answer to your question is
>unfortunately no at this time. However, I do plan to offer this feature
>in the near term. Do you need a solution right away or do we have some
>time? We currently only support TAN and SIN WCS projections (with or
>without SIP distortion corrections), although we will eventually add
>support for all projections defined in the FITS WCS spec. Different
>projections are relatively easy to add as long as I have some sample
>images with the appropriate WCS headers for testing. Could you work with
>a limited number of projections initially? If so, which projections would
>be required to get started and could you provide a sample image with each
>projection? We could do the file exchange outside this forum if desired.
Hi Karen,

Thanks for the answer.  In response, I'd have to say that I'm not entirely
sure about the projections you are referring to.  I"m relatively new to
WCS.  I had hoped to do this with students prior to the end of the school
year, but we can certainly just do some optical image manipulation in
place of doing any multi-wavelength overlays.  

Actually, here is the link to the radio data collected for M42 by the 20m.
 http://www.gb.nrao.edu/20m/peak/M42/Skynet_56260_M42_4880_3D.htm

You'll see two links for FITS data, FITS L and FITS R, which correspond to
left and right polarization.  This is an example of the radio data that
I'm working with.  If you click on "Log", there are also links for Orion-A
or M42 that would be really interesting candidates for overlays.  Perhaps
you can see what you need in the header information?

Here is an example of the header information from on image of M42 on the
optical side:

Header listing for HDU #1:
SIMPLE  =                    T
BITPIX  =                   16 /8 unsigned int, 16 & 32 int, -32 & -64 real
NAXIS   =                    2 /number of axes
NAXIS1  =                 1024 /fastest changing axis
NAXIS2  =                 1024 /next to fastest changing axis
BSCALE  =   1.0000000000000000 /physical = BZERO + BSCALE*array_value
BZERO   =   32768.000000000000 /physical = BZERO + BSCALE*array_value
OBJECT  = '        '
TELESCOP= '        ' /          telescope used to acquire this image
INSTRUME= 'Apogee Alta'
OBSERVER= 'greenbank'          / Skynet user who submitted observation
NOTES   = '        '
DATE-OBS= '2013-01-04T03:19:30' /YYYY-MM-DDThh:mm:ss observation start, UT
EXPTIME =   20.000000000000000 /Exposure time in seconds
EXPOSURE=   20.000000000000000 /Exposure time in seconds
SET-TEMP=  -20.000000000000000 /CCD temperature setpoint in C
CCD-TEMP=  -20.163948750000003 /CCD temperature at start of exposure in C
XPIXSZ  =   13.000000000000002 /Pixel Width in microns (after binning)
YPIXSZ  =   13.000000000000002 /Pixel Height in microns (after binning)
XBINNING=                    1 /Binning factor in width
YBINNING=                    1 /Binning factor in height
XORGSUBF=                    0 /Subframe X position in binned pixels
YORGSUBF=                    0 /Subframe Y position in binned pixels
FILTER  = 'Red     ' /          Filter used when taking image
IMAGETYP= 'Light Frame' /       Type of image
FOCALLEN=   4565.0000000000000 /Focal length of telescope in mm
APTDIA  =  0.00000000000000000 /Aperture diameter of telescope in mm
APTAREA =  0.00000000000000000 /Aperture area of telescope in mm^2
SWCREATE= 'MaxIm DL Version 4.60' /Name of software that created the image
SBSTDVER= 'SBFITSEXT Version 1.0' /Version of SBFITSEXT standard in effect
FLIPSTAT= 'Mirror  '
SWOWNER = 'Jack Harvey' /       Licensed owner of software
LATITUDE=      -0.526523656536 / Latitude in radians; negative = south
LONGITUD=      -1.235786194639 / Longitude in radians; negative = west
RA      = '05:35:17.3'         / Target Right Ascension, J2000
DEC     = '-05:23:27.202'      / Declination of target, J2000
TELRA   = '05:35:17.3'         / Right Ascension reported by telescope,
J2000
TELDEC  = '-05:23:27.202'      / Declination reported by telescope, J2000
OBJRA   = '05:35:17.3'         / Right Ascension of object, J2000
OBJDEC  = '-05:23:27.202'      / Declination of object
EPOCH   =                2000. / Epoch of coordinates
JD      =     2456296.63851207 / Julian day at start of exposure
SWVER   = 'Terminator - 2011.12.12' / Software used for telescope control
LST     = '05:31:50.3'         / Local sidereal time at start of exposure
HA      =  -0.0575049437091006 / Hour angle at exp start; neg = east of
meridian
SITEELEV=                7000. / Site elevation, meters
SECPIX  =                 0.59 / Image scale, arcsec per pixel
OBSERVAT= 'Prompt3 '           / Name of observatory or telescope
ZA      =     24.7900257064464 / Zenith angle at start of exposure, degrees
AIRMASS =     1.10128809772641 / Airmass at start of exposure
AZIMUTH = '+02:25:37.804'      / Azimuth in degrees; 0 = North, 90 = east
ELEVATIO= '+65:11:49.151'      / Target elevation in degrees; 0 = horizon,
90 =
DATE    = '2013-01-04'         / Date at start of exposure, UT
TIME-OBS= '03:19:27.443'       / Time at start of observation, UT
FOCUSPOS=                 1601 / Position of focus motor
SUNELEV =    -32.9954819008038 / Sun elevation, degrees
OBSID   =               696448 / Skynet observation ID
EXPID   =              7728814 / Skynet exposure ID
GRBID   =                   -1 / Skynet GRB ID
LATSTR  = '-30:10:3.300'       / Telescope latitude string; negative =
south
LONGSTR = '-70:48:19.200'      / Telescope longitude string; negative =
west
END

These data are publicly available, so I don't mind discussing them here
for now.

Dum spiro spero,

Russ Kohrs

A Husband and Father
Who teaches Geology and Astronomy...
Who insists that every rock can tell a story...
Who is transfixed by seemingly esoteric astrophysical concepts...
Who thinks of white-washed buildings and gold mosaics when he eats any
olive...
Who loves chili, particularly with pasta, hot sauce, onions, and copious
amounts of cheese...
And who would be happy to play bagpipes for your event!
http://www.wix.com/rkohrs/shenandoahpiper

You will certainly not doubt the necessity of studying astronomy and
physics, if you are desirous of comprehending the relation between the
world and Providence as it is in reality, and not according to imagination.

-- Maimonides




If you reply to this email, your message will be added to the discussion below:
http://astroimagej.1065399.n5.nabble.com/WCS-alignment-tp19p21.html
To start a new topic under AstroImageJ, email [hidden email]
To unsubscribe from AstroImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

rkohrs
"karenacollins [via AstroImageJ]" <[hidden email]>
writes:

>    Thanks for the information. The radio image uses SIN projection
>for RA and DEC (see CTYPE1 and CTYPE2 in the header) so we are good
>there. However, the it has 4 axes (RA, DEC, FREQ, STOKES) and AIJ can
>currently only deal with 2 axes (RA and DEC). The best possibility here
>is that I might be able (not sure) to ignore the FREQ and STOKES axes if
>you are not using those.
>    I don't see any WCS info in the header for the optical image
>header you sent. It looks like the image was written by MaximDL, and I
>don't see the usual headers that MaximDL adds after a "plate solve" has
>been ran on the image. I believe Maxim uses a program called pinpoint to
>do do the plate solve work.
>    Do you have an installation of DS9 available to you? If so, when
>you open the optical image in DS9, do you see RA and DEC displayed in the
>"alpha" and "delta" boxes above the image? If so, that means I am missing
>something in the header. If you do see RA and DEC in DS9 (or don't have
>access to DS9), I would like to get a copy of this image for testing if
>possible.
>    By the way, what is your end goal after alignment? Do you intend
>to build an RGB color image from 3 different images?
On the radio end, I think that the RA and DEC are sufficient.  FREQ just
refers to the frequency of the observation and I'm not certain about
STOKES.  

I'm attaching the actual optical images for you to look at. Unfortunately,
I don't have a working version of DS9...I did at one time, but not now, so
I have no way of looking at the alpha and delta boxes myself.  Would you
be able to?

In terms of the end result, I'd like for students to create their own
composite optical image first.  Then, I'd like for them to be able to
overlay the radio on top of that.  With M42, they would then be able to
pick out the location of the HII region that is so strong in
X-Band...among other things.

My background is actually in geology, but I worked at Green Bank this past
summer as an RET for eight weeks.  We recommissioned the USNO 20m radio
telescope there and brought its operation online via SKYNET.  While I
wrote a number of lesson plans for the 20m, along with manuals, etc....I
wanted to write an investigation that required students to learn some
basic optical image processing as well as allow them the opportunity to
see regions in optical and radio at the same time.  They're not paying me
for this anymore, but I just can't let it go :)...

Let me know if the attachments make it through okay.

Dum spiro spero,

Russ Kohrs

A Husband and Father
Who teaches Geology and Astronomy...
Who insists that every rock can tell a story...
Who is transfixed by seemingly esoteric astrophysical concepts...
Who thinks of white-washed buildings and gold mosaics when he eats any
olive...
Who loves chili, particularly with pasta, hot sauce, onions, and copious
amounts of cheese...
And who would be happy to play bagpipes for your event!
http://www.wix.com/rkohrs/shenandoahpiper

You will certainly not doubt the necessity of studying astronomy and
physics, if you are desirous of comprehending the relation between the
world and Providence as it is in reality, and not according to imagination.

-- Maimonides


M42blue.fits (5M) Download Attachment
M42Green.fits (5M) Download Attachment
M42Red.fits (5M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

karenacollins
Administrator
Hi Russ,
    I was able to retrieve the 3 images just fine. The headers on these images do have WCS data (RA---TAN and DEC--TAN) and work properly in both AIJ and DS9. I loaded all three and made a composite image with no problem (all 3 are aligned fairly well to start with), so you are set for the first part of your project. If you haven't worked out the steps to build a color composite from 3 separate images, I could write up a quick list of steps for you.
   To make your multi-wavelength project work, I think it is a matter of AIJ ignoring AXES 3 and 4 in the radio data and providing a feature to align/scale/rotate based on WCS. The current AIJ alignment routine relies on centroids of stars for alignment and only works when images are of the same scale and rotation, and when they are aligned within the radius of a specified aperture (which can be arbitrarily large as long as the field is sparse around the alignment stars selected). I hadn't considered dealing with the the scaling and rotation part when using WCS, so I will need to look into how difficult those will be to implement.  I am currently working in the WCS area of the code, so I will try to get back to you in a couple of weeks with the likelihood of being able to implement WCS alignment in time for your class.

Karen


On 2/4/2013 7:11 PM, rkohrs [via AstroImageJ] wrote:
"karenacollins [via AstroImageJ]" <[hidden email]>
writes:

>    Thanks for the information. The radio image uses SIN projection
>for RA and DEC (see CTYPE1 and CTYPE2 in the header) so we are good
>there. However, the it has 4 axes (RA, DEC, FREQ, STOKES) and AIJ can
>currently only deal with 2 axes (RA and DEC). The best possibility here
>is that I might be able (not sure) to ignore the FREQ and STOKES axes if
>you are not using those.
>    I don't see any WCS info in the header for the optical image
>header you sent. It looks like the image was written by MaximDL, and I
>don't see the usual headers that MaximDL adds after a "plate solve" has
>been ran on the image. I believe Maxim uses a program called pinpoint to
>do do the plate solve work.
>    Do you have an installation of DS9 available to you? If so, when
>you open the optical image in DS9, do you see RA and DEC displayed in the
>"alpha" and "delta" boxes above the image? If so, that means I am missing
>something in the header. If you do see RA and DEC in DS9 (or don't have
>access to DS9), I would like to get a copy of this image for testing if
>possible.
>    By the way, what is your end goal after alignment? Do you intend
>to build an RGB color image from 3 different images?
On the radio end, I think that the RA and DEC are sufficient.  FREQ just
refers to the frequency of the observation and I'm not certain about
STOKES.  

I'm attaching the actual optical images for you to look at. Unfortunately,
I don't have a working version of DS9...I did at one time, but not now, so
I have no way of looking at the alpha and delta boxes myself.  Would you
be able to?

In terms of the end result, I'd like for students to create their own
composite optical image first.  Then, I'd like for them to be able to
overlay the radio on top of that.  With M42, they would then be able to
pick out the location of the HII region that is so strong in
X-Band...among other things.

My background is actually in geology, but I worked at Green Bank this past
summer as an RET for eight weeks.  We recommissioned the USNO 20m radio
telescope there and brought its operation online via SKYNET.  While I
wrote a number of lesson plans for the 20m, along with manuals, etc....I
wanted to write an investigation that required students to learn some
basic optical image processing as well as allow them the opportunity to
see regions in optical and radio at the same time.  They're not paying me
for this anymore, but I just can't let it go :)...

Let me know if the attachments make it through okay.

Dum spiro spero,

Russ Kohrs

A Husband and Father
Who teaches Geology and Astronomy...
Who insists that every rock can tell a story...
Who is transfixed by seemingly esoteric astrophysical concepts...
Who thinks of white-washed buildings and gold mosaics when he eats any
olive...
Who loves chili, particularly with pasta, hot sauce, onions, and copious
amounts of cheese...
And who would be happy to play bagpipes for your event!
http://www.wix.com/rkohrs/shenandoahpiper

You will certainly not doubt the necessity of studying astronomy and
physics, if you are desirous of comprehending the relation between the
world and Providence as it is in reality, and not according to imagination.

-- Maimonides


M42blue.fits (5M) Download Attachment
M42Green.fits (5M) Download Attachment
M42Red.fits (5M) Download Attachment



If you reply to this email, your message will be added to the discussion below:
http://astroimagej.1065399.n5.nabble.com/WCS-alignment-tp19p23.html
To start a new topic under AstroImageJ, email [hidden email]
To unsubscribe from AstroImageJ, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: WCS alignment

rkohrs
I really appreciate it, Karen!  So will Sue Ann Heatherly and Glen
Langston.  I've actually made a number of composite images using ImageJ
already on my own...and you're right...the alignment is pretty good.  I
always have them interleave the filters :).  I have wanted to try to get
some images take with Halpha, etc., but it's been challenging for them to
line the telescope time up for me, let alone my 40 students, given the low
priority I have.  So, I'm sticking with RGB for now.

Thanks for working on this!  I am very excited...and will anxiously look
forward to your news.

Dum spiro spero,

Russ Kohrs

A Husband and Father
Who teaches Geology and Astronomy...
Who insists that every rock can tell a story...
Who is transfixed by seemingly esoteric astrophysical concepts...
Who thinks of white-washed buildings and gold mosaics when he eats any
olive...
Who loves chili, particularly with pasta, hot sauce, onions, and copious
amounts of cheese...
And who would be happy to play bagpipes for your event!
http://www.wix.com/rkohrs/shenandoahpiper

You will certainly not doubt the necessity of studying astronomy and
physics, if you are desirous of comprehending the relation between the
world and Providence as it is in reality, and not according to imagination.

-- Maimonides