Filenames in accref
Markus Demleitner
msdemlei at ari.uni-heidelberg.de
Tue Jun 12 06:00:27 PDT 2012
Hi Petr, hi list,
On Mon, Jun 11, 2012 at 01:01:34PM +0200, Petr Skoda wrote:
> We are going to change our format for spectra filenames as the
> current format was intented many years ago as DOS (8.3) compatible
> and now we are facing problem similar to Y2K ;-) in our case Y2016.
> To keep name short but verbose we have used format YMddnnnn.fit
> where Y was year as letter after 1990 (a=1990, b=1991 ...) and M
> letter of index of month (a=Jan, 2=Feb ....) dd - night of
> observatiton and nnnn index of exposure that night (since first).
> [...]
> Even if everything could be escaped in principle, I guess there might
> be some sound rule how to create such a names to be easily reused in
> VO databases, Votables, accref fields etc and probably it is better
> to avaid some delimiters.
>
> Could you comment on this - and help us to avoid surprizes or weird bugs ?
Well, the one thing I'd recommend is to steer clear of everything
that needs to be escaped in URLs, in particular with a view to
TAP-based services, where clients will/might see more or less "raw"
data and keeping track of what's encoded and what's not yet is just
another complication that's easily avoided.
A particularly insidious character that unfortunately is quite luring
in astronomy is the plus ("+") -- it may be "unescaped" to a blank by
various server software, and contrariwise, blanks may get "escaped"
to plusses by client software.
For simplicity, I always recommend the following rule: Keep it
matching to [A-Za-z0-9_.-]+ And don't try to stuff too much metadata
into the file name: that's what the metadata tables and file headers
are for. So long as you know it's going to be unique to a dataset,
you should be fine.
Cheers,
Markus
More information about the dal
mailing list