Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multi-Dimensional Data
12-21-2006, 14:04
Post: #1
Multi-Dimensional Data
This question was asked and answered by mail. I'll post both the question and the answer.

[Question]
I've been trying to run swarp on multi-dimensional fits data (naxis=4), but it core dumps. In the manual of swarp it is mentioned that swarp should be able to handle up to 9 dimensions. But I cannot find anything in the manual how to do operations on specific dimensions in a multi-dimensional fits file. So is it possible to use swarp on naxis > 2 fits files ? And how do I specify parameters for specific dimensions ??

[Answer from Emmanuel Bertin]
Yes the code is multidimensional, but it has not been tested in a long time. What are the 2 extra dimensions you are using? For the sake of memory consumption, the current versions of SWarp are limited to 2D. You might want to remove this limitation by changing a define at line 24 in src/fitswcs.h of the SWarp code:

#define NAXIS 2 /* Max number of FITS axes */

Just change it to something like

#define NAXIS 4 /* Max number of FITS axes */
Find all posts by this user
Quote this message in a reply
12-21-2006, 15:23
Post: #2
RE: Multi-Dimensional Data
I compiled swarp with NAXIS set to 4. Now the program does not core dump when using fits files with NAXIS 4. But I can't get swarp to produce anything. I simplified my problem to fits files with RA/DEC as the first two dimensions and frequency as the third (having length 1). This is a part of my fits header :

SIMPLE = T /
BITPIX = -32 /
NAXIS = 3 /
NAXIS1 = 2046 /
NAXIS2 = 2046 /
NAXIS3 = 1 /
NAXIS4 = 1 /
EXTEND = T /
CDELT1 = -1.11661437722E-03 /
CRPIX1 = 8.62000000000E+02 /
CRVAL1 = 2.18023833333E+02 /
CTYPE1 = 'RA---NCP' /
CDELT2 = 1.11661437722E-03 /
CRPIX2 = 1.02300000000E+03 /
CRVAL2 = 3.42798611111E+01 /
CTYPE2 = 'DEC--NCP' /
CDELT3 = 1.0 /
CRPIX3 = 1.00000000000E+00 /
CRVAL3 = 1.0 /
CTYPE3 = 'FREQ-OBS' /

When I try to regrid this in 2 dimensions (setting NAXIS to 2) all works fine. When I include the third dimension the ouput is rubbish, some NAXIS get very large negative values.

My goal is to regrid images in cubes. I have fits files with three or four dimensions, the first two RA and DEC, the third frequency, the fourth polarization. For the moment I'm trying to regrid only the RA and DEC dimension. So for each frequency, polarization combination in the fits file I want to regrid the RA and DEC coordinates (the images).

1. Is this possible with swarp ?
2. If yes, how do I configure swarp ??
Find all posts by this user
Quote this message in a reply
12-21-2006, 17:40
Post: #3
RE: Multi-Dimensional Data
Thanks for posting on the forum! This is an interesting case. I will check out the behaviour of SCAMP on >2D multidimensional data on my side and report back to you early next year. In the mean time, if you can send me a small multidimensional image of yours, I will be happy to fix the problem.
- Emmanuel.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)