Questions tagged [fits]

FITS is an image data file format used commonly for astronomical data.

FITS is an image data file format used commonly for astronomical data. It supports metadata for many photometric and calibration information.

See also: http://en.wikipedia.org/wiki/FITS

286 questions
4
votes
1 answer

Radial Profile from a .fits image

I have been trying to plot a radial profile of a fits image using a modified script I found on-line. I always get y axis units which are completely different to what's expected. I'm not even sure what the y axis units are. I have attached the fits…
BubbleGum
  • 53
  • 1
  • 4
4
votes
2 answers

How to change the dtype of a numpy recarray when one of the columns is an array?

In previous posts I've seen that changing dtype of a recarray can be performed using astype. However I cannot manage to do it with a recarray which has an array in one of its columns. My recarray comes from a FITS file record: > f =…
mtc
  • 43
  • 1
  • 4
4
votes
2 answers

astropy.io.fits - HIERARCH keywords don't work with CONTINUE cards: Bug or "Feature" of the FITS standard?

The astropy.io.fits manual states, that we can use header keywords longer than 8-characters. In this case HIERARCH cards will be created. The manual also states, that if we want to store keyword-value pairs longer than 80-characters, continue cards…
Christian Herenz
  • 395
  • 4
  • 13
4
votes
1 answer

Assign WCS coordinates to a FITS image

I've been searching the documentation like crazy and cannot find an answer for this one. I'm generating FITS images in python and need to assign WCS coordinates to the image. I know there are lots of ways to do this by matching up point sources…
Teachey
  • 529
  • 5
  • 16
4
votes
0 answers

canvas image and svg overlay

I use the astrojs library (precisely webfits and fitsjs) to load a FITS file in a canvas. I would like to add an overlay to encircle stars, trace paths and so on, and I decided to do it with d3.js This is my current test (it takes a while to…
leonard vertighel
  • 1,018
  • 1
  • 14
  • 33
3
votes
1 answer

Coordinate conversion problem of a FITS file

I have loaded and plotted a FITS file in python. With the help of a previous post, I have managed to get the conversion of the axis from pixels to celestial coordinates. But I can't manage to get them in milliarcseconds (mas) correctly. The code is…
Wara
  • 184
  • 1
  • 9
3
votes
1 answer

CSharpFits: Writing FITS-file results in wrong image

I am currently working on a C#-project to reduce echelle spectra, which are basically 2D 16bit images in FITS format. The end result, for now, should be another FITS-file, but one-dimensional. For this task I am using the CSharpFits-library…
kinarf
  • 31
  • 3
3
votes
0 answers

Changing Astropy WCS projection

I use the below python script to read the world coordinate system (WCS) form a fits file and plot it. from astropy.io import fits import matplotlib.pyplot as plt from astropy.wcs import WCS hdu = fits.open('file.fits') header = hdu[0].header data =…
Mc Missile
  • 585
  • 5
  • 20
3
votes
1 answer

Get pixel coordinates from ra, dec after oversampling FITS image

I'm looking for a way to locate the pixel coordinates on my FITS image that correspond to ra and dec positions of an object in degrees, after oversampling. This would be simple if I wasn't oversampling, but I need to. Given an unaltered FITS image,…
curious_cosmo
  • 1,062
  • 10
  • 28
3
votes
2 answers

Astropy Fits: How to write out a table with rows sliced out?

I'm currently working with some fits tables and I'm having trouble with outputting in Astropy.io.fits. Essentially, I am slicing out a bunch of rows that have data for objects I'm not interested in, but when I save the new table all of those rows…
AshleyNova
  • 45
  • 4
3
votes
1 answer

How to change the header after resizing a submap?

I load a full map from astropy.io import fits from astropy.wcs import wcs mapheader = fits.getheader(MapFile, 0) mapdata = fits.getdata(MapFile, 0) w = wcs.WCS(mapheader) and I take a squared submap from it assuming the center is in RA,DEC in…
3
votes
1 answer

astropy.io.fits read row from large fits file with mutliple HDUs

I have a fits file with ~50GB, containing multiple HDUs, which all have the same format: an (1E5 x 1E6) array with 1E5 objects and 1E6 time stamps. The HDUs describe different physical properties such as Flux, RA, DEC etc. I want to read just 5…
MaxG
  • 233
  • 3
  • 8
3
votes
2 answers

Adding columns to a FITS table with PyFITS

Let's assume I have a fits file with one extension, and the data consists of a table of two columns with 100 elements each data = pyfits.open('path2myfile')[1].data head = pyfits.open('path2myfile')[1].header print data['field1'] # print an array…
Cehem
  • 83
  • 1
  • 5
2
votes
1 answer

Read FITS files

I have some experience in several programming languages, but I would like to try APL. I'm doing some tutorials, but I want to work in a practical example. I would like to read astronomical images from a file, in FITS format (a very common format for…
J C Gonzalez
  • 716
  • 5
  • 21
2
votes
1 answer

Converting pixels into wavelength using 2 FITS files

I am new to python and FITS image files, as such I am running into issues. I have two FITS files; the first FITS file is pixels/counts and the second FITS file (calibration file) is pixels/wavelength. I need to convert pixels/counts into…
1
2
3
19 20