PDA

View Full Version here: : Fits Files


bkm2304
01-05-2008, 04:51 PM
Hi all,

Can someone tell me how to create a fits file from an image? I want to use astrometrica and this is my first challenge.

Richard:help:

Terry B
06-05-2008, 09:17 PM
Depends what you are saving your images as. If they are bitmaps or tiffs then opening them in Iris and saving as fits is pretty easy to do.

jase
07-05-2008, 01:06 AM
You'll need an application that will write out the FITS headers as the images are save into the FITS format. You can't simply save a tiff file into a FITS (well you can, but it wont have the FITS headers!). Software such as CCDSoft, MaximDL, etc, etc there are quite a few, that will do the job. For Astrometrica to work, the FITS header will need to contain RA and DEC info, image scale and obviously date/time (preferable in UTC format). Astrometrica will do the plate solve for you or used an solving engine such a pinpoint (based on the header info), but you'll also need to download the star catalogues for this function. Would recommend USNO-A2.0 - its about 6Gb in size.

Example FITS file header (plate solve info highlighted in bold, calibration info highlighted in red) - you will also note, I'm using the Hubble guidestar catalog (GSC-ACT), not USNO-A2.0 as I don't need that level of accuracy or quantity of stars for imaging and using a wide field instrument respectively;

SIMPLE = T
BITPIX = -32 /8 unsigned int, 16 & 32 int, -32 & -64 real
NAXIS = 2 /number of axes
NAXIS1 = 4008 /fastest changing axis
NAXIS2 = 2672 /next to fastest changing axis
BSCALE = 1.0000000000000000 /physical = BZERO + BSCALE*array_value
BZERO = 0.00000000000000000 /physical = BZERO + BSCALE*array_value
OBJECT = 'Eta Mosaic panel A6' / Target object name
TELESCOP = 'ACP->Gemini' / Telescope name
INSTRUME = 'SBIG ST-L-11K 3 CCD Camera' / Detector instrument name
OBSERVER = 'Observatory Operator' / Observer name
NOTES = ' '
DATE-OBS = '2008-01-03T15:41:04' / [ISO 8601] UTC date/time of exposure start
EXPTIME = 9.00000000000E+002 / [sec] Duration of exposure
EXPOSURE = 9.00000000000E+002 / [sec] Duration of exposure
SET-TEMP = -15.000000000000000 /CCD temperature setpoint in C
CCD-TEMP = -14.809516780639790 /CCD temperature at start of exposure in C
XPIXSZ = 9.0000000000000000 /Pixel Width in microns (after binning)
YPIXSZ = 9.0000000000000000 /Pixel Height in microns (after binning)
XBINNING = 1 / Binning level along the X-axis
YBINNING = 1 / Binning level along the Y-axis
XORGSUBF = 0 /Subframe X position in binned pixels
YORGSUBF = 0 /Subframe Y position in binned pixels
FILTER = 'Red ' / Filter name
IMAGETYP = 'Light Frame' / Type of image
SITELAT = 'xxx' / Latitude of the imaging location
SITELONG = 'xxx' / Longitude of the imaging location
TRAKTIME = 3.0000000000000000 /Exposure time used for autoguiding
EGAIN = 0.83999997377395630 /Electronic gain in e-/ADU
FOCALLEN = 530.00000000000000 /Focal length of telescope in mm
APTDIA = 106.00000000000000 /Aperture diameter of telescope in mm
APTAREA = 8824.7340095043182 /Aperture area of telescope in mm^2
SWCREATE = 'MaxIm DL Version 4.58' /Name of software that created the image
SBSTDVER = 'SBFITSEXT Version 1.0' /Version of SBFITSEXT standard in effect
CBLACK = 1221 /Initial display black level in ADUs
CWHITE = 8380 /Initial display white level in ADUs
PEDESTAL = -100 /Correction to add for zero-based ADU
SWOWNER = 'Jason ' / Licensed owner of software
PIERSIDE = 'WEST '
HISTORY File was processed by PinPoint 5.0.13 at 2008-01-03T15:56:56
DATE = '03/01/08' / [old format] UTC date of exposure start
TIME-OBS = '15:41:04' / [old format] UTC time of exposure start
UT = '15:41:04' / [old format] UTC time of exposure start
TIMESYS = 'UTC ' / Default time system
RADECSYS = 'FK5 ' / Equatorial coordinate system
AIRMASS = 1.14216758858E+000 / Airmass (multiple of zenithal airmass)
ST = '08 32 28.02' / Local apparent sidereal time of exp. start
LAT-OBS = xxx / [deg +N WGS84] Geodetic latitude
LONG-OBS = xxx / [deg +E WGS84] Geodetic longitude
ALT-OBS = 2.38000000000E+002 / [metres] Altitude above mean sea level
OBSERVAT = 'Ridgeview Observatory' / Observatory name
RA = '10 43 31.98' / [hms J2000] Target right ascension
OBJCTRA = '10 43 31.98' / [hms J2000] Target right ascension
DEC = '-57 52 02.1' / [dms +N J2000] Target declination
OBJCTDEC = '-57 52 02.1' / [dms +N J2000] Target declination
CLRBAND = 'R ' / [J-C std] Std. color band of image or C=Color
HISTORY File was processed by PinPoint 5.0.13 at 2008-01-03T15:57:17
FWHM = 9.00000000000E+002 / [pixels] Mean Full-Width-Half-Max of image star
ZMAG = 1.64760135630E+001 / Mag zero point for 1 sec exposure
EQUINOX = 2000.0 / Equatorial coordinates are J2000
EPOCH = 2000.0 / (incorrect but needed by old programs)
PA = 2.43052027384E+002 / [deg, 0-360 CCW] Position angle of plate
CTYPE1 = 'RA---TAN' / X-axis coordinate type
CRVAL1 = 1.60749899615E+002 / X-axis coordinate value
CRPIX1 = 2.00400000000E+003 / X-axis reference pixel
CDELT1 = 9.68446293912E-004 / [deg/pixel] X-axis plate scale
CROTA1 = -6.30520273836E+001 / [deg] Roll angle wrt X-axis
CTYPE2 = 'DEC--TAN' / Y-axis coordinate type
CRVAL2 = -5.79067302630E+001 / Y-axis coordinate value
CRPIX2 = 1.33600000000E+003 / Y-axis reference pixel
CDELT2 = 9.68290746298E-004 / [deg/pixel] Y-Axis Plate scale
CROTA2 = -6.30520273836E+001 / [deg] Roll angle wrt Y-axis
CD1_1 = 4.38881687475E-004 / Change in RA---TAN along X-Axis
CD1_2 = 8.63152190197E-004 / Change in RA---TAN along Y-Axis
CD2_1 = -8.63290848203E-004 / Change in DEC--TAN along X-Axis
CD2_2 = 4.38811196215E-004 / Change in DEC--TAN along Y-Axis
TR1_0 = 2.00400002575E+003 / [private] X-axis distortion coefficients
TR1_1 = 4.00799999955E+003
TR1_2 = 6.86887711268E-002
TR1_3 = 5.84267911489E-001
TR1_4 = -2.42174705118E-001
TR1_5 = -3.98516821880E-001
TR1_6 = -5.13251134699E+000
TR1_7 = 3.56954228621E-001
TR1_8 = -2.05683508460E+000
TR1_9 = 1.48578769399E+000
TR1_10 = 5.01878465314E-001
TR1_11 = 5.91947966505E-001
TR1_12 = 2.35602405993E-001
TR1_13 = 2.90504524932E-001
TR1_14 = 3.12456825276E+000
TR2_0 = 1.33599999901E+003 / [private] Y-axis distortion coefficients
TR2_1 = -3.99618984734E-003
TR2_2 = 2.67199999979E+003
TR2_3 = -2.63811698070E-001
TR2_4 = 2.39904774590E-001
TR2_5 = -1.21437053013E-001
TR2_6 = -3.37763794843E-001
TR2_7 = -2.42778033869E+000
TR2_8 = -1.28613933140E-001
TR2_9 = -1.20332490487E+000
TR2_10 = 1.55406535495E+000
TR2_11 = 3.16630713149E-001
TR2_12 = -6.41541488633E-002
TR2_13 = -4.02170598928E-002
TR2_14 = 1.42000084295E+000
HISTORY WCS added by PinPoint 5.0.13 at 2008-01-03T15:57:17
HISTORY Matched 351 stars from the Gray GSC-ACT Catalog
HISTORY Average residual was 0.49 arc-seconds
PLTSOLVD = T / Plate has been solved by PinPoint
INPUTFMT = 'FITS ' / Format of file from which image was read
SWMODIFY = 'MaxIm DL Version 4.58' /Name of software that modified the image
HISTORY Bias Subtraction (Bias 6, 4008 x 2672, Bin1 x 1, Temp -15C,
HISTORY Exp Time 0ms)
CALSTAT = 'BDF '
HISTORY Dark Subtraction (Dark 19, 4008 x 2672, Bin1 x 1, Temp -15C,
HISTORY Exp Time 900s)
HISTORY Flat Field (Flat 2, 4008 x 2672, Bin1 x 1, Temp -10C,
HISTORY Exp Time 54ms)
CSTRETCH = 'Medium ' / Initial display stretch mode

Tandum
07-05-2008, 01:32 AM
A fits image file is capable of storing 64bit data which gives a huge dynamic range to images, although you'll be lucky to find hardware that can supply better than a 16bit image. Regardless, this means it can store very bright and very dim objects in the same file. It is not meant as an image transport system like a BMP or JPEG, but as a data storage medium. If you can save images to fits in the first place then do so and convert to something else from there using the fits as the master.

Nasa has a list of viewers and convertors here :- http://fits.gsfc.nasa.gov/fits_viewer.html