Welcome to iraf.net Monday, May 20 2024 @ 09:10 AM GMT


 Forum Index > Help Desk > Applications New Topic Post Reply
 How to Change String to Number in table
   
Quietskies
 08/05/2009 11:22AM (Read 1670 times)  
++---
Junior

Status: offline


Registered: 05/01/2007
Posts: 17
HiI met a problem when I tried to rebin some spectra in text format.The format is like :Wavelength Flux
1000 1.000E29
1005 1.0100E29
...... ........But when I tried to rebin them by the trebin task, the Flux column was treated like a string, so it was ignored. I tried to use rtext to change the format to fits, but the same problem exist.So is there anyway to change the format from string to real number, or let iraf read columns from table in certain format like FORTRAN ?Thanks a lotBest WishesYours Quietskies

Astronomy is life, Others, mere details
 
Profile Email
 Quote
Jason Quinn
 08/05/2009 11:22AM  
+++++
Active Member

Status: offline


Registered: 04/07/2006
Posts: 175
[quote:3376f2a69d="Quietskies"]
So is there anyway to change the format from string to real number, or let iraf read columns from table in certain format like FORTRAN ?
[/quote:3376f2a69d]The scan command is what you are looking for. Do a "help scan" and example 2 shows you how to use print in combination with scan to achieve a result similar to what you want.Jason

 
Profile Email
 Quote
   
Content generated in: 0.09 seconds
New Topic Post Reply

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