Re: How to add several *.fit files (matrices) into one output *.fit file? [message #63390 is a reply to message #63388] |
Thu, 06 November 2008 12:17   |
Griffons
Messages: 15 Registered: November 2008
|
Junior Member |
|
|
On Nov 6, 3:16 pm, Paolo <pgri...@gmail.com> wrote:
> I think you may have been confused by the posts
> about automatically locate files.... these are important for
> IDL source code, but when you are dealing with data,
> you have to spacifiy the full path.
>
> Normally I use something as
> file=dir+filename
> such that when I need to move the files somewhere else
> I only need to change the dir in one place.
>
> Ciao,
> Paolo
>
>
>
> Griffons wrote:
>> On Nov 6, 2:35 pm, Paolo <pgri...@gmail.com> wrote:
>>> Griffons wrote:
>>>> On Nov 6, 1:57 pm, David Fanning <n...@dfanning.com> wrote:
>>>> > Griffons writes:
>>>> > > Thank you for your help.
>>>> > > I compiled all the procedures related to readfits and writefits.
>>>> > > When I run readfits, it gives this error:
>>>> > > Attempt to call undefined procedure/function: 'READFITS'.
>>>> > > Execution halted at: $MAIN$
>
>>>> > > As a result, the files cannot be read when they are called:
>>>> > > files=3D['test1.fits','test2.fits',...] ; I tried files_search it does
>>>> > > not work.
>
>>>> > > writefits work when is run.
>
>>>> > > What could I do?
>
>>>> > The next step is to read this article:
>
>>>> >http://www.catb.org/~esr/faqs/smart-questions.html
>
>>>> > Especially the part about "don't say program XXX doesn't
>>>> > work unless you are *absolutely* sure about it."
>
>>>> > Cheers,
>
>>>> > David
>>>> > --
>>>> > David Fanning, Ph.D.
>>>> > Fanning Software Consulting, Inc.
>>>> > Coyote's Guide to IDL Programming:http://www.dfanning.com/
>>>> > Sepore ma de ni thui. ("Perhaps thou speakest truth.")
>
>>>> I compiled gettok, mrd_skip, strnumber, sxaddpar, sxdelpar, sxpar,
>>>> valid_num, and readfits. They all worked. Then I run readfits and it
>>>> does not work.
>
>>> How does it fail then?
>
>>> Paolo- Hide quoted text -
>
>>> - Show quoted text -
>
>> Hello Paolo,
>> how are you?
>
>> Here is what I get as error message:
>> It is not able to locate any of the files. I am not sure how to pick/
>> search for them.
>
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\readfits.pro"
>> Compiled module: READFITS.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\readfits.pro"
>> Compiled module: READFITS.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\strnumber.pro"
>> Compiled module: STRNUMBER.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\sxaddpar.pro"
>> Compiled module: SXADDPAR.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\sxdelpar.pro"
>> Compiled module: SXDELPAR.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\sxpar.pro"
>> Compiled module: SXPAR.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\tbget.pro"
>> Compiled module: TBGET.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\valid_num.pro"
>> Compiled module: VALID_NUM.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\ftget.pro"
>> Compiled module: FTGET.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\gettok.pro"
>> Compiled module: GETTOK.
>> IDL> .COMPILE "C:\Documents and Settings\Owner\My Documents
>> \Data_Reduction\code\READFITS_code\mrd_skip.pro"
>> Compiled module: MRD_SKIP.
>> IDL> files=['S_08189493.fit','S_08189494.fit','S_08189495.fit',
>> 'S_08189496.fit'] ;
>> IDL> sum = READFITS( files[0], /NOSCALE)
>> READFITS: ERROR - Unable to locate file S_08189493.fit- Hide quoted text -
>
> - Show quoted text -
Hello Paolo,
Thank you for your help.
Griffons
|
|
|