Welcome to iraf.net Friday, May 17 2024 @ 04:16 AM GMT


 Forum Index > Archives > Sitemail Archives
 Missing error message/warning from imexpr
   
Anonymous: Guest
 09/15/2005 01:51PM (Read 6569 times)  



Dear IRAF,I have just spent two hours trying to locate a problem my colleague
had with imexpr, which when she used it gave output images which were
identically one.The problem was that she did: imexpr "(a > 20) ? 1 : O" foo.pl a=bar.fits
instead of : imexpr "(a > 20) ? 1 : 0" foo.pl a=bar.fitsi.e. using an upper case O instead of a zero! While one has to ask oneself
how she could make this typo, it would nevertheless have been a great help
if imexpr has given an error or warning message that operand o was undefined.Cheers, Bo

 
Anonymous: Guest
 09/15/2005 01:51PM  



Hi Bo,Thanks for the very interesting quirk! My first inclination was to
agree that this is a bug. However, looking into it this looks like
a "feature". It is NOT treating the "O" as referring to the value
specified by the "o" parameter. In other words this is case
sensitive. Instead there is the feature that I, J, K, ... refer to
the coordinate of the particular axis. In this case it is the
coordinate for axis 7. In IRAF tasks it is allowed to refer to axes
beyond the dimension of the image and the value of that axis is then
1. In other words an image that is [512,512] is equivalently the
same as [512,512,1,1,1,1,1].So while it might be a good idea to protect against this I'm not sure
what the right change would be. So my inclination is to do nothing.
If you want to argue differently I would be glad to hear your view.Cheers,
Frank
On Sep 15, 2005, at 6:51 AM, Bo Milvang-Jensen wrote:> Dear IRAF,
>
> I have just spent two hours trying to locate a problem my colleague
> had with imexpr, which when she used it gave output images which were
> identically one.
>
> The problem was that she did: imexpr "(a > 20) ? 1 : O" foo.pl
> a=bar.fits
> instead of : imexpr "(a > 20) ? 1 : 0" foo.pl
> a=bar.fits
>
> i.e. using an upper case O instead of a zero! While one has to ask
> oneself
> how she could make this typo, it would nevertheless have been a
> great help
> if imexpr has given an error or warning message that operand o was
> undefined.
>
> Cheers, Bo
>

 
   

Normal Topic Normal Topic
Sticky Topic Sticky Topic
Locked Topic Locked Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content 
dog allergies remedies cialis 20 mg chilblain remedies


Privacy Policy
Terms of Use

User Functions

Login