Welcome to iraf.net Friday, May 17 2024 @ 09:57 AM GMT
piverson |
04/27/2008 02:36PM (Read 3482 times)
|
|
|
Status: offline
Registered: 07/10/2007
Posts: 42
|
Mike-This is a dumb question, but is there an absolute value command for real numbers in IRAF? I have thought about importing the abs() command from linux but all comments say that it only works with int (I thought this was weird). I can get around the issue, quick and dirty, with if statements but would prefer the elegance of a simple command.Thanks.-Paul
|
|
|
|
fitz |
04/27/2008 02:36PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
[code:1:2f4f926d8b]
ecl> =abs(-1.2)
1.2
ecl> print (abs(-3.14))
3.14
[/code:1:2f4f926d8b]-Mike
|
|
|
|
piverson |
04/27/2008 02:36PM
|
|
|
Status: offline
Registered: 07/10/2007
Posts: 42
|
Mike-Is there an easy way to calculate the square root of a number in IRAF?Thanks.-Paul
|
|
|
|
fitz |
04/27/2008 02:36PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
Use sqrt()See the $iraf/doc/clman.ms doc for a list of available functions but in general it is what you'd expect.-Mike
|
|
|
|
piverson |
04/27/2008 02:36PM
|
|
|
Status: offline
Registered: 07/10/2007
Posts: 42
|
Thanks Mike.I don't know what happened from the time I posted until the time you replied. We tried the =sqrt() command but it didn't work until you said to try it. (Craig thinks that you must have some remote connection to our IRAF installation and added that task for us so that we could feel really stupid).In all seriousness though thanks again.
|
|
|
|
| |
|
Content generated in: 0.16 seconds |
|