Merge pull request #8 from jochenstahn/name
output name made up from sample name, mu and date
This commit is contained in:
+1
-1
@@ -29,7 +29,7 @@ except ImportError:
|
||||
AMOR_LOCAL_TIMEZONE = zoneinfo.ZoneInfo(key='Europe/Zurich')
|
||||
|
||||
if platform.node().startswith('amor'):
|
||||
NICOS_CACHE_DIR = '/home/amor/nicosdata/amor/cache/'
|
||||
NICOS_CACHE_DIR = '/home/amor/nicosdata/cache/'
|
||||
GREP = '/usr/bin/grep "value"'
|
||||
else:
|
||||
NICOS_CACHE_DIR = None
|
||||
|
||||
@@ -104,6 +104,16 @@ class ReflectivityReduction:
|
||||
self.read_file_block(i, short_notation)
|
||||
|
||||
# output
|
||||
if self.config.output.is_default('outputName'):
|
||||
import datetime
|
||||
_date = datetime.datetime.now().replace(microsecond=0).isoformat()
|
||||
if self.header.sample.name:
|
||||
_sampleName = self.header.sample.name.replace(' ', '_')
|
||||
else:
|
||||
_sampleName = 'unknown'
|
||||
_mu = int(self.dataset.geometry.mu * 3)
|
||||
self.config.output.outputName = f'{_sampleName}_{_mu:03}_{_date}'
|
||||
|
||||
logging.warning('output:')
|
||||
|
||||
if 'Rqz.ort' in self.config.output.outputFormats:
|
||||
|
||||
Reference in New Issue
Block a user