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

Home » Public Forums » archive » help needed in timegen
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: help needed in timegen [message #94031 is a reply to message #94030] Wed, 28 December 2016 20:22 Go to previous messageGo to previous message
gunvicsin11 is currently offline  gunvicsin11
Messages: 93
Registered: November 2012
Member
On Wednesday, December 28, 2016 at 9:42:54 PM UTC+5:30, Jim P wrote:
> On Wednesday, December 28, 2016 at 4:37:36 AM UTC-7, fawltyl...@gmail.com wrote:
>> On Wednesday, December 28, 2016 at 11:10:06 AM UTC+1, sid wrote:
>>> Hi all,
>>>
>>> I have given below what I have done.
>>>
>>> print,julday(10,22,2014,14,00,32),format='(g)'
>>> 2456953.083703704
>>>
>>> mytimes=timegen(1,units='seconds',step_size=14,start=2456953 .083703704)
>>>
>>>
>>> The idea is to get julian at this date/time
>>> 10,22,2014,14,00,32 and
>>>
>>> 14 second after this, that is at 10,22,2014,14,00,46
>>>
>>> I expect the result to be 2456953.083865741.
>>>
>>> But If I do
>>> print, mytimes
>>> 2456953.0
>>>
>>> Please anybody let me know how to resolve this.
>>>
>>> thanks
>>
>> IDL> mytimes=timegen(2,units='seconds',step_size=14,start=2456953 .083703704d)
>> IDL> print, mytimes, format='(D20.10)'
>> 2456953.0837037046
>> 2456953.0838657417
>>
>> regards,
>> Lajos
>
> If you have IDL 8.5 or later, the new "implied print" syntax helps you get around the default formatting of the standard PRINT behavior.
>
> First option, simply type the variable name at the prompt.
>
> IDL> mytimes
> 2456953.0837037046 2456953.0838657417
>
> This is the same as using PRINT with the /IMPLIED keyword.
>
> IDL> print, mytimes, /implied
> 2456953.0837037046 2456953.0838657417
>
> The keyword can be unambiguously abbreviated to "/i":
>
> IDL> print, mytimes, /i
> 2456953.0837037046 2456953.0838657417
>
> There's less typing involved than with an explicit FORMAT string. (But also see the new C-style formatting in IDL 8.6.)
>
> Jim P.

But if I need to get the values in the variable itself without printing, then what should I do,

Because I am going to use the variable in a loop, I want the variable mytimes to have value with 2456953.083703704 format.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Circular statistics in IDL
Next Topic: help needed in the format of the output variable

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

Current Time: Fri Oct 10 12:22:09 PDT 2025

Total time taken to generate the page: 1.11923 seconds