Welcome to iraf.net Tuesday, April 30 2024 @ 06:40 PM GMT
joshjturner |
09/13/2006 05:53PM (Read 3382 times)
|
|
|
Status: offline
Registered: 09/13/2006
Posts: 1
|
Hi -Just a quick question that may not be a good one. Is there a way to divide every entry in a text file or a list by a string? In other words, I have a script that gives me a list of numbers that I want to plot, but I have to normalize by a number (that I have written to another text file), so I've been painfully doing it by hand becaue I can't find an easier way using IRAF. imarith only works on images, but I want to do the same thing basically using lists. Thanks!Josh
|
|
|
|
fitz |
09/13/2006 05:53PM
|
|
|
Status: offline
Registered: 09/30/2005
Posts: 4040
|
See the TCALC task in the TABLES.TOOLS package.If what you have is a file with some numbers and you want to divide each by a constant:[code:1:8ff4ff49cb]
list = "numbers.txt"
while (fscan (list, x) != EOF) {
print ((x / 3.14159))
}
[/code:1:8ff4ff49cb]Cheers,
-Mike
|
|
|
|
| |
|
Content generated in: 0.08 seconds |
|