comp.lang.idl-pvwave archive - RDF feed
type: channel
description: Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado
items: help needed in the format of the output variable
items: Re: help needed in the format of the output variable

help needed in the format of the output variable
type: item
description: Hi all, I have given below the table 2457331.055891204 2457331.056041667 2457331.056192130 2457331.056342593 2457331.056481482 2457331.056631945 I am reading the file like this, IDL> r=dblarr(6) IDL> openr,2,'jultest.dat' IDL> readf,2,r,format='(g)' IDL> close,2 IDL> print,r(1) 2457331.1 IDL> print,r(1),format='(g)' 2457331.056041667 I need to give this r(1) into, caldat,r(1),m,d,y,h,mi,s here the r(1) is 2457331.1 how do i give the 2457331.056041667 as input into the caldat. please let me know how to resolve this. thanks in advance
creator: gunvicsin11
date: 2016-12-29T10:26:34-00:00

Re: help needed in the format of the output variable
type: item
description: On Thursday, December 29, 2016 at 11:26:37 AM UTC+1, sid wrote: > Hi all, > I have given below the table > 2457331.055891204 > 2457331.056041667 > 2457331.056192130 > 2457331.056342593 > 2457331.056481482 > 2457331.056631945 > > I am reading the file like this, > IDL> r=dblarr(6) > IDL> openr,2,'jultest.dat' > IDL> readf,2,r,format='(g)' > IDL> close,2 > IDL> print,r(1) > 2457331.1 > IDL> print,r(1),format='(g)' > 2457331.056041667 > > I need to give this r(1) into, > > caldat,r(1),m,d,y,h,mi,s > > here the r(1) is 2457331.1 > > how do i give the 2457331.056041667 as input into the caldat. > > please let me know how to resolve this. > > thanks in advance You have a single r(1) with about 16 decimal digits precision. The two PRINT's just print this value in different formats. CALDAT gets the full precision number. Call CALDAT first with r[0], then with r[1] and compare the results. regards, Lajos
creator: Lajos Foldy
date: 2016-12-29T22:01:36-00:00

Re: help needed in the format of the output variable
type: item
description: On Friday, December 30, 2016 at 3:31:39 AM UTC+5:30, fawltyl...@gmail.com wrote: > On Thursday, December 29, 2016 at 11:26:37 AM UTC+1, sid wrote: >> Hi all, >> I have given below the table >> 2457331.055891204 >> 2457331.056041667 >> 2457331.056192130 >> 2457331.056342593 >> 2457331.056481482 >> 2457331.056631945 >> >> I am reading the file like this, >> IDL> r=dblarr(6) >> IDL> openr,2,'jultest.dat' >> IDL> readf,2,r,format='(g)' >> IDL> close,2 >> IDL> print,r(1) >> 2457331.1 >> IDL> print,r(1),format='(g)' >> 2457331.056041667 >> >> I need to give this r(1) into, >> >> caldat,r(1),m,d,y,h,mi,s >> >> here the r(1) is 2457331.1 >> >> how do i give the 2457331.056041667 as input into the caldat. >> >> please let me know how to resolve this. >> >> thanks in advance > > You have a single r(1) with about 16 decimal digits precision. The two PRINT's just print this value in different formats. CALDAT gets the full precision number. Call CALDAT first with r[0], then with r[1] and compare the results. > > regards, > Lajos Thanks a lot. I got it now.
creator: gunvicsin11
date: 2016-12-30T04:24:44-00:00