Re: How to add several *.fit files (matrices) into one output *.fit file? [message #63385] |
Thu, 06 November 2008 13:40  |
Chris[6]
Messages: 84 Registered: July 2008
|
Member |
|
|
On Nov 6, 11:20 am, Griffons <griffon...@gmail.com> wrote:
> On 6 nov, 14:53, Chris <beaum...@ifa.hawaii.edu> wrote:
>
>
>
>> On Nov 6, 9:38 am, Griffons <griffon...@gmail.com> 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
>
>> It doesn't know where this file is - probably because it is in a
>> folder IDL doesn't know about. IDL has a list of directories that it
>> looks for whenever trying to read or run anything (this is also how
>> you get around manually compiling all of these files -IDL
>> automatically looks in these folders and will automatically compile
>> the code it needs to if it can find it). I have an older version of
>> IDL, but there should be something like edit->preferences in IDL.
>> Then, find the tab called 'path', choose to add a new directory to the
>> path, and then add in all of the folders where you keep IDL code or
>> files you want IDL to read. Then, things should compile and read much
>> more easily. Note, you should be able to check a box that searches in
>> all of the subdirectories of a given folder as well.
>
>> Once you set up these paths, go ahead and dump the ENTIRE IDL astro
>> library in one of the folders in your path. Then, you never need to
>> worry about compiling them again.
>
>> chris- Ocultar texto de la cita -
>
>> - Mostrar texto de la cita -
>
> Hello Chris,
>
> How do you reverse the process you told me about?
>
> Thank you.
>
> Griffons
Reverse the process of adding files to your path? I would go back to
file->preferences->path, and there should be an entry like 'remove'.
I thought you could set up the path for files to read as well but, as
Paolo suggests, maybe you can't do it this way. Sorry for the
confusion
chris
|
|
|