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
13
votes
2 answers

How to plot Gaia astrometry data to TESS images using Python?

Long story short: I want to plot Gaia astrometry data to TESS imagery in Python. How is it possible? See below for elaborated version. I have 64x64 pixel TESS imagery of a star with Gaia ID 4687500098271761792. Page 8 of the TESS Observatory Guide…
zabop
  • 3,885
  • 3
  • 14
  • 47
9
votes
1 answer

Median combining fits images in python

I have three fits images in the form of 2D numpy arrays. I want to median combine them, that is, generate an output array in which each pixel is the median of the same pixel in the three input arrays. This can be done easily on IRAF using imcombine.…
rferdinand
  • 2,434
  • 8
  • 26
  • 30
8
votes
1 answer

Find physical coordinates of a pixel in a fits file with python

I am tying to get the physical sky coordinates of a given pixel from within a python script. I would like to use astropy's WCS, but I'll do anything from within python. I have tried these two snippets of code. from astropy.io import fits from…
Benjamin Rose
  • 165
  • 2
  • 6
7
votes
1 answer

Cartesian projection issue in a FITS image through PyFITS / AstroPy

I've looked and looked for a solution to this problem and am turning up nothing. I'm generating rectangular FITS images through matplotlib and subsequently applying WCS coordinates to them using AstroPy (or PyFITS). My images are in galactic…
Teachey
  • 529
  • 5
  • 16
6
votes
3 answers

OSError 24 (Too many open files) when reading bunch of FITS with astropy.io

I’m trying to load into memory a few 2 000 FITS using astropy.io.fits: def readfits(filename): with fits.open(filename) as ft: # the fits contain a single HDU data = ft[0].data return data data_sci = [] for i in…
Arcturus B
  • 3,731
  • 2
  • 27
  • 46
5
votes
3 answers

Reading variable-length arrays from a FITS table using the CFITSIO library

I am having a tough time reading variable-length arrays from the entries of a FITS table, using the CFITSIO libraries (I have to use them due to another software I am developing). Now, the FITS table I am trying to read looks like this: As you can…
5
votes
2 answers

FITS Export with custom Metadata

does anybody has experience in exporting data as a FITS file with custom Metadata (FITS header) information? So far I was only able to generate FITS files with the standard Mathematica FITS header template. The documentation gives no hint on whether…
Markus Roellig
  • 530
  • 3
  • 13
5
votes
1 answer

Writing fits files with astropy.io.fits

I'm trying to append data to a fits file using astropy.io. Here is an example of my code: import numpy as np from astropy.io import fits a1 = np.array([1,2,4,8]) a2 = np.array([0,1,2,3]) hdulist = fits.BinTableHDU.from_columns( …
Renee
  • 61
  • 3
5
votes
1 answer

Cropping very large fits files using specified boundaries

I have a large fits file (over 30,000 x 30,000) pixels. IRAF cannot handle this size of image. How can one crop a file of this size while retaining correct header information, as IRAF does when using its standard cropping mode?
ConnorG
  • 51
  • 1
  • 2
5
votes
6 answers

Hack a FITs Image Header

I need to change a few values in a couple of FITs image headers to fit with some test data I have. Therefore I'm trying to hack a FITs image header at the minute to run with the application. However at the minute - I can't even see the header, never…
Federer
  • 30,291
  • 37
  • 89
  • 120
4
votes
1 answer

Issue translating World Coordinate system to cartesian coordinate

I have two fits images from the WFC3 that I am trying to combine with a C# program. When I try to combine multiple images I don't think the values I am getting for my x/y coordinates (calculated from Right Ascension/Declination) are correct. I am…
JamesL
  • 194
  • 2
  • 3
  • 11
4
votes
2 answers

Plotting SDSS images with python

I need to plot some SDSS images with python. I downloaded the original frames from the SDSS DR7 and I'm trying to display (a zoom of) the image with the WCS coordinates projection. The original image has north on the right and east on top. According…
Cloud182
  • 91
  • 10
4
votes
1 answer

How do I overlay two .fits images each with different WCS / resolutions?

I'm trying to plot contours from one image of an object, let's say in band A, on top of a lower resolution image of that same object, let's say in band Z. Both images are in large fits files, so I have to create a 2D cutout of each. However, the…
astrobrown
  • 41
  • 1
  • 3
4
votes
0 answers

What to do with: ValueError: x and y can be no greater than 2-D, but have shapes (1L,) and (1L, 28L, 28L)

My goal is to plot a profile of a 2D FITS file that I already asked the user for with a try/except. I want to slice a part of this FITS file and then plot this part. I will just put my whole code here. I don't think there is anything wrong with the…
Thomas
  • 53
  • 1
  • 6
4
votes
1 answer

How to remove stars and other objects from a galaxy FITS image using Matlab?

I have the following image in fits format. I want to remove all the stars and other smaller dots from that image using matlab. I performed the following matlab operations to remove stars in it. I = imread('NGC_0253.jpg'); if size(I,3)==3 …
An student
  • 351
  • 1
  • 5
  • 13
1
2 3
19 20