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

Home » Public Forums » archive » Works on Linux, not on MacOS
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
Works on Linux, not on MacOS [message #69981] Thu, 04 March 2010 07:59 Go to next message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
Hi all,

I've come across a very strange problem. I'm using Astrolib's FIND
procedure to look for objects in an image. When I run my program on
my Linux work computer, it works; when I run it on my personal
MacBook, it doesn't.

I'm using the same version of IDL and the same version of FIND in both
cases. Here's my example code (using the same fits file, which was
generated on the Linux machine):

LINUX:
IDL> img = readfits('resid_BrGamma_con.fits',/silent)
IDL> find, img, x,y,f,s,r,5.d2,0.02,[-1.0,1.0],[0.2,1.0],/silent
IDL> help, x
X FLOAT = Array[228]
IDL> print, x[0:9]
1693.41 201.085 248.418 2107.43 2089.72
2120.00
1641.70 1942.30 688.136 882.025

MAC:
IDL> img = readfits('resid_BrGamma_con.fits',/silent)
IDL> find, img, x,y,f,s,r,5.d2,0.02,[-1.0,1.0],[0.2,1.0],/silent
IDL> help, x
X FLOAT = Array[249]
IDL> print, x[0:9]
-NaN -NaN -NaN -NaN -
NaN -NaN -NaN -NaN -NaN -NaN


What is going on??

Thanks for your help, as always :)

--Gray
Re: Works on Linux, not on MacOS [message #70051 is a reply to message #69981] Sat, 06 March 2010 08:52 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 6, 1:12 pm, Gray <grayliketheco...@gmail.com> wrote:
> Okay... From the writeup of find.pro it seemed that that keyword
> should be the FWHM of the filter (as in, the width of the filter in
> wavelength).  How do I figure out the FWHM of my sources w/o using
> find to pick them out?

No. It is a spatial filter. It is the fwhm of the kernel used in the
convolution. Find does spatial processing on single images, there is
nothing in it related to wavelengths.
Re: Works on Linux, not on MacOS [message #70052 is a reply to message #69981] Sat, 06 March 2010 08:12 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Mar 5, 10:41 am, wlandsman <wlands...@gmail.com> wrote:
> On Mar 4, 10:59 am, Gray <grayliketheco...@gmail.com> wrote:
>
>> Hi all,
>> MAC:
>> IDL> img = readfits('resid_BrGamma_con.fits',/silent)
>> IDL> find, img, x,y,f,s,r,5.d2,0.02,[-1.0,1.0],[0.2,1.0],/silent
>> IDL> print, x[0:9]
>>          -NaN         -NaN         -NaN         -NaN         -
>> NaN         -NaN         -NaN         -NaN         -NaN         -NaN
>
>> What is going on??
>
> You are telling find.pro (http://idlastro.gsfc.nasa.gov/ftp/pro/idlphot/find.pro)
> that the approximate  FWHM of sources on your image is 0.02
> pixels.     This is not a plausible value, and results in the spurious
> centroid positions.
>
> So why does it work on your Linux machine?    I suspect you have an
> older version of find.pro that used a more simplistic (but evidently
> more robust) centroid algorithm.   --Wayne

Okay... From the writeup of find.pro it seemed that that keyword
should be the FWHM of the filter (as in, the width of the filter in
wavelength). How do I figure out the FWHM of my sources w/o using
find to pick them out?
Re: Works on Linux, not on MacOS [message #70057 is a reply to message #69981] Fri, 05 March 2010 07:49 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 5, 12:41 pm, wlandsman <wlands...@gmail.com> wrote:
> You are telling find.pro (http://idlastro.gsfc.nasa.gov/ftp/pro/idlphot/find.pro)
> that the approximate  FWHM of sources on your image is 0.02
> pixels.     This is not a plausible value, and results in the spurious
> centroid positions.
>
> So why does it work on your Linux machine?    I suspect you have an
> older version of find.pro that used a more simplistic (but evidently
> more robust) centroid algorithm.   --Wayne

Now it sounds like a path issue. It seems that IDL is not calling the
same find.pro he thinks it is (the one that is the same used in the
Linux computer). He should check with file_which('find.pro') on both
computers, to make sure it is the same file.
Re: Works on Linux, not on MacOS [message #70058 is a reply to message #69981] Fri, 05 March 2010 07:41 Go to previous message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Mar 4, 10:59 am, Gray <grayliketheco...@gmail.com> wrote:
> Hi all,
> MAC:
> IDL> img = readfits('resid_BrGamma_con.fits',/silent)
> IDL> find, img, x,y,f,s,r,5.d2,0.02,[-1.0,1.0],[0.2,1.0],/silent
> IDL> print, x[0:9]
>          -NaN         -NaN         -NaN         -NaN         -
> NaN         -NaN         -NaN         -NaN         -NaN         -NaN
>
> What is going on??

You are telling find.pro ( http://idlastro.gsfc.nasa.gov/ftp/pro/idlphot/find.pro)
that the approximate FWHM of sources on your image is 0.02
pixels. This is not a plausible value, and results in the spurious
centroid positions.

So why does it work on your Linux machine? I suspect you have an
older version of find.pro that used a more simplistic (but evidently
more robust) centroid algorithm. --Wayne
Re: Works on Linux, not on MacOS [message #70059 is a reply to message #69981] Fri, 05 March 2010 06:14 Go to previous message
Gray is currently offline  Gray
Messages: 253
Registered: February 2010
Senior Member
On Mar 4, 11:04 pm, pp <pp.pente...@gmail.com> wrote:
> On Mar 5, 12:49 am, Gray <grayliketheco...@gmail.com> wrote:
>
>> How do I find out which build I'm running?  I looked through the
>> config details on the "About IDL Workbench" splash screen, but I
>> didn't see anything that would indicate either way.
>
> help,!version,/struct
>
> But if the problem is not on readfits, this probably does not matter.

IDL> help, !version, /struct
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'i386'
OS STRING 'darwin'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'Mac OS X'
RELEASE STRING '7.0'
BUILD_DATE STRING 'Oct 25 2007'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 64
Re: Works on Linux, not on MacOS [message #70066 is a reply to message #69981] Thu, 04 March 2010 20:04 Go to previous message
penteado is currently offline  penteado
Messages: 866
Registered: February 2018
Senior Member
Administrator
On Mar 5, 12:49 am, Gray <grayliketheco...@gmail.com> wrote:
> How do I find out which build I'm running?  I looked through the
> config details on the "About IDL Workbench" splash screen, but I
> didn't see anything that would indicate either way.

help,!version,/struct

But if the problem is not on readfits, this probably does not matter.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: percent disagreement
Next Topic: Re: percent disagreement

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

Current Time: Wed Oct 08 20:02:44 PDT 2025

Total time taken to generate the page: 0.01804 seconds