comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » convert .dat to .fits
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
convert .dat to .fits [message #84948] Wed, 19 June 2013 12:12 Go to next message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
hi
i have data.dat i want to convert it to .fits
by using idl
please help
bye
Re: convert .dat to .fits [message #84949 is a reply to message #84948] Wed, 19 June 2013 12:20 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Ali Gamal writes:

> i have data.dat i want to convert it to .fits
> by using idl

I don't want to be a pessimist, but I think you really want to be using
MatLab here. :-)

Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: convert .dat to .fits [message #84950 is a reply to message #84948] Wed, 19 June 2013 12:29 Go to previous messageGo to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
You need to read your data.dat into an IDL variable and then write it to FITS.
We need to know more about the format of your data.dat file before we can tell you how to read it. If it is a binary file, then you can use READ_BINARY()

im = read_binary('data.dat') ;Read data into variable
writefits,'test.fits',im ;Write variable to a FITS file 'test.fits'

You need to get writefits.pro from the IDL Astronomy library if you don't already have it.
http://idlastro.gsfc.nasa.gov/

On Wednesday, June 19, 2013 3:12:46 PM UTC-4, Ali Gamal wrote:
> hi
>
> i have data.dat i want to convert it to .fits
>
> by using idl
>
> please help
>
> bye
Re: convert .dat to .fits [message #84952 is a reply to message #84948] Wed, 19 June 2013 12:34 Go to previous messageGo to next message
Russell Ryan is currently offline  Russell Ryan
Messages: 122
Registered: May 2012
Senior Member
On Wednesday, June 19, 2013 3:12:46 PM UTC-4, Ali Gamal wrote:
> hi
>
> i have data.dat i want to convert it to .fits
>
> by using idl
>
> please help
>
> bye

Well, since you've given no information about what the data.dat file contains or what *TYPE* of fits file you want, it's truly impossible to answer your question without some snarky comment. Maybe you should tell us more about the data in the data.dat file, more about the structure of the output you'd like, and where exactly you're stuck. Just for good measure, also tell us is the data.dat file an ascii file or some other goofy thing. What precisely do you mean by "fits" file --- do you mean flexible image transport system used primarily in astronomy? We all need to be on the same page here, and you're not very forthcoming with information.
Re: convert .dat to .fits [message #84976 is a reply to message #84948] Thu, 20 June 2013 06:17 Go to previous message
Ali Gamal is currently offline  Ali Gamal
Messages: 98
Registered: June 2013
Member
On Wednesday, June 19, 2013 9:12:46 PM UTC+2, Ali Gamal wrote:
> hi
>
> i have data.dat i want to convert it to .fits
>
> by using idl
>
> please help
>
> bye
...................
thanks all
i using astronomy program
now my output is .jpg
i want to make my output .fits
how can i make it
thanks bye
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: How to grid pixel level data where latitude and longitude are 2D arrays
Next Topic: replace integration by summation

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:06:23 PDT 2025

Total time taken to generate the page: 0.00624 seconds