Brad,
OK. Fixed that - a minor mod to ndg1_expan.f
David
On Wed, 26 Apr 2006, Brad Cavanagh wrote:
> Hi David,
>
> On Tue, 7 Mar 2006, David Berry wrote:
>
> > I've backed out of making any changes to HDS. Instead, I have
> > modified NDG so that it handles spaces in both directory names and file
> > names. I've been able to do this because NDG uses ONE_FIND_FILE which
> > takes a different approach to rec1_find_file. Within NDG, I temporarily
> > stop HDS doing any expansion of shell metacharacters by setting the SHELL
> > tuning parameter to -1.
> >
> > This means that NDG-based application (e.g. KAPPA, and now CUPID) should
> > now handle spaces OK.
> >
> > Part of this was adding a new function to one, ONE_SHELL_ECHO, which
> > expands all shell metacharacters in a supplied string, but without any
> > file globbing. This is needed to clean up names supplied for output files
> > (i.e. names of files which may not yet exist).
>
> Sorry to dredge up an old thread, but this appears to not be
> backwards-compatible. I used to be able to do something like:
>
> % stats ndf='gw20060206_1_var( 1:1024,1921:2048)'
>
> ...and have it get the NDF section properly. Now, this gives:
>
> % stats ndf='gw20060206_1_var( 1:1024,1921:2048)'
> !! Cannot access 1:1024
> ! Please give a new value for parameter NDF
> !
>
> >From the ORAC-DR output it appears that the spaces within the quoted
> string are being escaped out:
>
> #9 Err: !! Invalid NDF dimension bound '\ \ \ 1' specified; bad syntax.
> #9 Err: ! Error in dimension 1 of the NDF section expression '(\ \ \
> #9 Err: ! 1:1024,1921:2048)'.
> #9 Err: ! Unable to select the specified section of the NDF
> #9 Err: ! /ukirtdata/reduced/wfcam1/20060206_swfcam/gw20060206_1_var
> #9 Err: ! NDF_OPEN: Error opening an NDF data structure.
> #9 Err: ! Unable to get an NDF identifier for 'gw20060206_1_var(\ \ \
> #9 Err: ! 1:1024,1921:2048)'
> #9 Err: ! STATS: Error computing simple statistics for an NDF's pixels.
> #9 Err: !! NDF__BNDIN: bounds invalid
> #9 Err: Error in obeyw to monolith kappa_mon (task=stats): 232950474
> Arguments were: ndf='gw20060206_1_var( 1:1024,1921:2048)' clip=3
>
> I realise I could just take the spaces out, but they make my ORAC-DR
> primitive look prettier. :-)
>
> This isn't urgent by any stretch of the imagination, but there might be
> old scripts out there that use spaces in quoted strings like this for NDF
> sections.
>
> Cheers,
> Brad.
>
|