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

Home » Public Forums » archive » Store differents size of .fits into one single array
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
Store differents size of .fits into one single array [message #86178] Wed, 16 October 2013 10:21 Go to next message
a.clovirola is currently offline  a.clovirola
Messages: 6
Registered: June 2013
Junior Member
Hello everyone,

My question is about dealing with multiple size of image before any operation.
I have several .fits file of different size : 1050x800, 525x400 mainly.
i use file_search to list the different names and create an empty array (1050,800,n-elements(filelist).
My problem is with the smaller array, he refuses to write it due to the different size.
Is there a way to trick IDL to write 0 instead of nothing for the smaller images ?

Thank your for your time :)
Re: Store differents size of .fits into one single array [message #86179 is a reply to message #86178] Wed, 16 October 2013 11:09 Go to previous messageGo to next message
Fabzi is currently offline  Fabzi
Messages: 305
Registered: July 2010
Senior Member
On 10/16/2013 07:21 PM, Alexander C. wrote:
> Is there a way to trick IDL to write 0 instead of nothing
> for the smaller images ?

Yes (arr[0:524,0:399]=smaller_array), but I am not sure if it is a good
idea to so. Whatever operation you are going to do afterwards is going
to be tiresome with all those zeros.

If you have IDL8+ you could use a list to store your images. If not, you
could use a pointer array (PTRARR)
Re: Store differents size of .fits into one single array [message #86192 is a reply to message #86179] Thu, 17 October 2013 05:19 Go to previous message
a.clovirola is currently offline  a.clovirola
Messages: 6
Registered: June 2013
Junior Member
> If you have IDL8+ you could use a list to store your images. If not, you
>
> could use a pointer array (PTRARR)

Thanks for the list tip, i used it and it works, i have now a liste containing my arrays :)

fich=file_search(dir+'*'+format)
image=list()

for i=0,n_elements(fich)-1 do image.add,readfits(file[i])

if someone is interessed :)
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: New Fast Kriging Semivariogram Spherical Model Incorrect?
Next Topic: How to read a csv file?

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

Current Time: Wed Oct 08 07:22:56 PDT 2025

Total time taken to generate the page: 0.02078 seconds