i need to use this idl function. but how ? [message #91237] |
Fri, 19 June 2015 08:58  |
Cibi Raj
Messages: 18 Registered: May 2015
|
Junior Member |
|
|
Hey i need to use a function called read_wind_mfi.pro
It is from WInd_3dp libraries made for analysing data from Wind spacecraft by Dr. Lynn Wilson of Nasa.
The read_wind_mfi.pro is used to load the magnetic field data which I have stored in my directories.
;+
;*********************************************************** ******************************
;
; FUNCTION : read_wind_mfi.pro
; PURPOSE : Reads in 3-second Magnetic Field Instrument (MFI) data from
; the Wind spacecraft and returns a structure composed of the
; the GSE magnetic field, its magnitude, and the times
; associated with the data in seconds of day (default tag is in
; unix time).
;
; CALLS:
; time_range_define.pro
; read_cdf.pro
; epoch2unix.pro
; fix_bfield_data.pro
;
; REQUIRES:
; 1) UMN Modified Wind/3DP IDL Libraries
; 2) Wind 3s CDF files from CDAWeb
; e.g. 'wi_h0_mfi_YYYYMMDD.cdf'
;
; INPUT:
; NA
;
; KEYWORDS:
; DATE : [string] 'MMDDYY' [MM=month, DD=day, YY=year]
; TRANGE : [Double] 2 element array specifying the range over
; which to get data structures [Unix time]
;*********************************************************** ********************
This is the notes given in the read_wind_mfi.pro and it should be called by
IDL> test = read_wind_mfi([arguments],KEYWORDS=[keywords])
this. Now I need to know what to put in the place of arguments and keywords ?
Can you please provide me an example of it , so i could just change the value and put it on IDL. ?
|
|
|
Re: i need to use this idl function. but how ? [message #91238 is a reply to message #91237] |
Fri, 19 June 2015 10:02   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Cibi Raj writes:
> This is the notes given in the read_wind_mfi.pro and it should be called by
>
> IDL> test = read_wind_mfi([arguments],KEYWORDS=[keywords])
>
> this. Now I need to know what to put in the place of arguments and keywords ?
>
> Can you please provide me an example of it , so i could just change the value and put it on IDL. ?
Why don't you just keep reading? The documentation will explain the
arguments to you, the order in which they should be placed after the
name of the command, and the purpose and name of each of the keywords
you can use.
Honestly, if you can't figure this out on your own (perhaps with a bit
of experimentation), you will never be able to use IDL. You should give
up now and save yourself immense frustration. I say this in the kindest
way possible. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|
Re: i need to use this idl function. but how ? [message #91239 is a reply to message #91238] |
Fri, 19 June 2015 11:31   |
Dick Jackson
Messages: 347 Registered: August 1998
|
Senior Member |
|
|
On Friday, 19 June 2015 10:02:49 UTC-7, David Fanning wrote:
> Cibi Raj writes:
>
>> This is the notes given in the read_wind_mfi.pro and it should be called by
>>
>> IDL> test = read_wind_mfi([arguments],KEYWORDS=[keywords])
>>
>> this. Now I need to know what to put in the place of arguments and keywords ?
>>
>> Can you please provide me an example of it , so i could just change the value and put it on IDL. ?
>
> Why don't you just keep reading? The documentation will explain the
> arguments to you, the order in which they should be placed after the
> name of the command, and the purpose and name of each of the keywords
> you can use.
>
> Honestly, if you can't figure this out on your own (perhaps with a bit
> of experimentation), you will never be able to use IDL. You should give
> up now and save yourself immense frustration. I say this in the kindest
> way possible. :-)
>
> Cheers,
>
> David
It looks like Cibi Raj has given all the documentation that was available, but needs a hand to connect the dots. If they had added an EXAMPLE section to the documentation, it might look like this:
; EXAMPLE
; result = read_wind_mfi(DATE='123199', TRANGE=[startTime, endTime])
; (where startTime and endTime are numbers in "Unix time")
; (https://en.wikipedia.org/wiki/Unix_time)
Don't give up hope! I think you first need to know the basics of IDL procedure and function calling. This page, describing how IDL routines are documented, may give some helpful examples:
http://www.exelisvis.com/docs/idl_syntax.html
Can anyone offer a link to a better "orientation" for someone who is thrown into the waters of IDL, perhaps as a first-time programmer without access to a mentor or even a good book? I will point out David's fine book (in PDF form), for those who have the option of buying it:
http://www.idlcoyote.com/coyotestore/index.php?main_page=pro duct_info&cPath=66&products_id=183
Cheers,
-Dick
Dick Jackson Software Consulting Inc.
Victoria, BC, Canada --- http://www.d-jackson.com
|
|
|
|
Re: i need to use this idl function. but how ? [message #91341 is a reply to message #91237] |
Wed, 01 July 2015 07:22  |
Cibi Raj
Messages: 18 Registered: May 2015
|
Junior Member |
|
|
On Friday, 19 June 2015 17:58:44 UTC+2, Cibi Raj wrote:
> Hey i need to use a function called read_wind_mfi.pro
>
> It is from WInd_3dp libraries made for analysing data from Wind spacecraft by Dr. Lynn Wilson of Nasa.
>
> The read_wind_mfi.pro is used to load the magnetic field data which I have stored in my directories.
>
> ;+
> ;*********************************************************** ******************************
> ;
> ; FUNCTION : read_wind_mfi.pro
> ; PURPOSE : Reads in 3-second Magnetic Field Instrument (MFI) data from
> ; the Wind spacecraft and returns a structure composed of the
> ; the GSE magnetic field, its magnitude, and the times
> ; associated with the data in seconds of day (default tag is in
> ; unix time).
> ;
> ; CALLS:
> ; time_range_define.pro
> ; read_cdf.pro
> ; epoch2unix.pro
> ; fix_bfield_data.pro
> ;
> ; REQUIRES:
> ; 1) UMN Modified Wind/3DP IDL Libraries
> ; 2) Wind 3s CDF files from CDAWeb
> ; e.g. 'wi_h0_mfi_YYYYMMDD.cdf'
> ;
> ; INPUT:
> ; NA
> ;
> ; KEYWORDS:
> ; DATE : [string] 'MMDDYY' [MM=month, DD=day, YY=year]
> ; TRANGE : [Double] 2 element array specifying the range over
> ; which to get data structures [Unix time]
> ;*********************************************************** ********************
>
> This is the notes given in the read_wind_mfi.pro and it should be called by
>
> IDL> test = read_wind_mfi([arguments],KEYWORDS=[keywords])
>
> this. Now I need to know what to put in the place of arguments and keywords ?
>
> Can you please provide me an example of it , so i could just change the value and put it on IDL. ?
Thank you so much for all of your replies ! these were very helpful. i am accessing the materials given by you :)
|
|
|