comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » very very strange thing is happening with modfits......
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
very very strange thing is happening with modfits...... [message #93458] Thu, 21 July 2016 22:15 Go to previous message
Sapna Mishra is currently offline  Sapna Mishra
Messages: 66
Registered: December 2015
Member
Hello all, Here I am pasting a protion of my code:

readcol,'comb_file.dat',wav,new_flux,new_eflux,F='(f,f,f)'
new_loglam=alog10(wav)
id_ok = where(new_eflux gt 0, cnt_ok)
eivar_new=(1./new_eflux(id_ok))^2
new_loglam=alog10(wav(id_ok))
new_flux=new_flux(id_ok)
aa=mrdfits(fname(n_elements(fname)-1),1,h1)
aa.flux=cspline(new_loglam,new_flux,aa.loglam)
aa.ivar=abs(cspline(new_loglam,ivar_new,aa.loglam))
modfits,fname(n_elements(fname)-1),aa,h1,EXTEN_NO=1

I checked the value of aa.flux and aa.ivar before modifying with modfits:

They are just normal values eg. 14.7555,15.9066......etc.
But after modifying it to a fits file stored in variable:fname(n_elements(fname)-1)
I got very different values: 2.26270e+28,-5.91691e-11.......with message:
%Program caused arithmetic error: Floating illegal operand.

I wasted my whole day in this checking what is going wrong after modfits. I am using the latest version of modfits.pro.

What is going wrong can anyone please tell me???????????????????////

I checked there is no problem in cspline or anything they are just normal finite values.(eg. not inf and NaN anywhere)
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: File units (de)allocation in IDL - what is the proper way?
Next Topic: table in fits format

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 09:18:27 PDT 2025

Total time taken to generate the page: 0.00434 seconds