request for feedback : vso_info.pro

3 views
Skip to first unread message

Joe Hourcle

unread,
Nov 25, 2011, 6:03:22 PM11/25/11
to vso...@googlegroups.com

So, in the interest of having something to new to show at AGU, I decided
to finally buckle down and make a routine to show what valid values are
for making queries in VSO.

I have no idea if the current format is useful, and I've already found a
few quirks that I need to stop out, but if people would like to test it
out:

Download a copy from:
http://sdo1.nascom.nasa.gov/drms/idl/vso_info.pro

.compile it


There's actually both a procedure and a function, which is why you have to
use '.compile' ... the question is going to be which one to keep.

As a function, it returns an array of structures:

print_struct, vso_info( /instrument )
print_struct, vso_info( /source )
print_struct, vso_info( /instrument, /source)

(of course, this also reveals some of the inconsistencies of naming; and
the reason 'STEREO' doesn't have a name is because it's compressing out
the fact that there's a 'STEREO-A' and 'STEREO-B')

As a procedure, it'll automatically call print_struct, unless you tell it
/QUIET:

vso_info, /instrument

But, there's then an output keyword of 'output':

vso_info, /instrument, output=output, /quiet
print_struct, output

As I have no clean way of getting them both to work without using
.compile, do you prefer the function, or the procedure?

The next question is ... is the array of structures a useful return, or
would something else be better?

And the caveats :

Currently supported (with a lose definition of 'supported')

/instrument (/telescope)
/source (/spacecraft, /observatory)
/provider
/layout (/datatype)
/physobs
/detector

Currently unsupported:

/extent
/nickname


Right now, the returns aren't in any particular order ... I should
do something about that, but it's Friday, and it's late.

I'm using 'webget' instead of Dominic's HTTP object (as it
returned a string, without needing to mess with files ... but it
seems to not clean up LUNs automatically after using them)

The plan was originally for it to take the same arguments as
vso_search, so that you could ask for what instruments were valid
for a given date, or which observables for a given instrument,
etc. If people think they would use it, I'll try to hack it back
in, but that's part of why I've been putting this off for ~3 years
(finding a good way to handle giving it the input that it's a
major kludge)

And likewise, for requests for 'wave' and 'time', which are
handled as sub-structures, so it's going to take me additional
work. (and I've also hacked some support into vso_search so it
takes strings for 'wave' like 'euv', 'visible', etc ... which
might be a conflict w/ asking for the actual spectral ranges to be
returned)

...

Anyway, let me know what you think, if you'd prefer some other way of
interacting with in (input, output), if it fails under your version of
IDL, etc.

-Joe


ps. no, it has nothing to do with DRMS or SDO specifically, that's just
where I've been stashing IDL code for people to test, so I thought I'd
put it there, rather than spread it across more servers

Joseph B. Gurman

unread,
Nov 26, 2011, 10:34:47 AM11/26/11
to vso...@googlegroups.com
Joe -

Thanks very much for doing this.

Can't say why, but it seems more "natural" (does that mean more like other IDL routine I use? Dunno) to use the procedure, though in either case, it would be nice if the text information were left-justified, rather than right-. Is there a way to do that? The IDL astronomy library print_struct routine assigns an "A<n>" FORTAN format to strings, which IIRC is always left justified, so I have to believe you're right justifying the string with spaces before it gets to the routine. I s that possible?

Best,

Joe

Joe Hourcle

unread,
Nov 26, 2011, 11:12:37 AM11/26/11
to vso...@googlegroups.com

On Nov 26, 2011, at 10:34 AM, Joseph B. Gurman wrote:

> Joe -
>
> Thanks very much for doing this.
>
> Can't say why, but it seems more "natural" (does that mean more like other IDL routine I use? Dunno) to use the procedure, though in either case, it would be nice if the text information were left-justified, rather than right-. Is there a way to do that? The IDL astronomy library print_struct routine assigns an "A<n>" FORTAN format to strings, which IIRC is always left justified, so I have to believe you're right justifying the string with spaces before it gets to the routine. I s that possible?

I'm just passing it to print_struct right now ... I have no idea why it's doing it.

If I were going to force a justification, I'd right justify the acronyms, and left justify the long descriptions, just so they're closer together.

I'll see what I can do to fix it.

-Joe

Reply all
Reply to author
Forward
0 new messages