Merge pull request #8 from jochenstahn/name

output name made up from sample name, mu and date
This commit is contained in:
Jochen Stahn
2026-01-20 14:07:07 +01:00
committed by GitHub
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -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
+10
View File
@@ -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: