Welcome to iraf.net Thursday, May 02 2024 @ 09:25 AM GMT
rjvo |
01/25/2011 08:26AM (Read 1274 times)
|
|
|
Status: offline
Registered: 04/21/2007
Posts: 134
|
I do a very simple command in IRAF 2.15[code:1:681b123da6]imdel f; imexpr "1.0" f dim="1024,1"
imstat f
[/code:1:681b123da6]gives the result[code:1:681b123da6]IMAGE NPIX MEAN STDDEV MIN MAX
f 1024 9.447E29 2.787E31 0. 8.889E32[/code:1:681b123da6]and[code:1:681b123da6]prow f 1[/code:1:681b123da6]does not show constan 1. The command[code:1:681b123da6]imdel f; imexpr "I+1.0-I" f dim="1024,1"[/code:1:681b123da6]is correct.
|
|
|
|
fitz |
01/25/2011 08:26AM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
It is arguable whether this is a real bug, or just a bad way for the task to behave, but it's been in the task since it was first released. What's happening is that for a scalar expression like "1.0" the task is only ever setting the first pixel in the line, the remainder of the line is undefined and so becomes filled with random values.For what you're trying to do, a working expression would use the 'repl' function to replicate a value, e.g.[code:1:d185434db2]cl> imexpr "repl(1.0,16)" f dim="16,1"[/code:1:d185434db2]It seems more intuitive to me however that if the expression is a simple constant than the intent is that ALL pixels be set to that value, and so I've modified the task for the next release to do that. Until then, the above expression should do what you want.
|
|
|
|
| |
|
Content generated in: 0.09 seconds |
|