| uniqname | stsdas.toolbox.tools | uniqname |
uniqname -- Create a unique file name for files that are to be archived.
uniqname extension instr
This task combines the instrument name with the current time to create a file name that will be unique over the telescope's lifetime. The file name root has the format YMDHHMMSI where
Y denotes the year (where 1981 = 1)
M denotes the month of the year (where January = 1)
D denotes the day
HH denotes the hour (00-23)
MM denotes the minutes
S denotes seconds/2
I denotes the instrument ( where f=fgs, v=HSP, w=WFPC,
x=FOC, y=FOS, z=HRS, m=multiple)
The file name extension provided by the user is appended to the unique root. The task checks to see if a file by the same name already exists in the current directory and if it does, it creates a new file name root. The file name generated is not guaranteed to be unique across directories. The algorithm used to generate the file name has a time granularity of two seconds.
HST instrument name. If a file is used by more than one instrument, the value "multi" should be passed to instr.
1. Generate a unique file name for the FGS with the extension .d0h.
to> uniqname d0h fos to> print(uniqname.value)