Commit 5267ebf5 authored by eric pellegrini's avatar eric pellegrini
Browse files

Modified the default value for the basename of Outputfilesonfigurator

Modified the default value for the mcstas output directory
Removed comments
parent d7c260f7
......@@ -31,6 +31,7 @@ Created on Mar 30, 2015
'''
import os
import tempfile
import time
from MDANSE import PLATFORM
......@@ -43,7 +44,7 @@ class McStasOptionsConfigurator(IConfigurator):
type = "mcstas_options"
_default = {"ncount" : 10000, "dir" : os.path.join(os.getcwd(),"mcstas_output",time.strftime("%d.%m.%Y-%H:%M:%S", time.localtime()))}
_default = {"ncount" : 10000, "dir" : os.path.join(tempfile.gettempdir(),"mcstas_output",time.strftime("%d.%m.%Y-%H:%M:%S", time.localtime()))}
def configure(self, configuration, value):
'''
......
......@@ -31,6 +31,7 @@ Created on May 21, 2015
'''
import os
import tempfile
from MDANSE import PLATFORM, REGISTRY
from MDANSE.Framework.Configurators.IConfigurator import IConfigurator, ConfiguratorError
......@@ -49,7 +50,7 @@ class OutputFilesConfigurator(IConfigurator):
type = 'output_files'
_default = ("output", ["netcdf"])
_default = (os.path.join(tempfile.gettempdir(),"output"), ["netcdf"])
def __init__(self, name, formats=None, **kwargs):
'''
......
......@@ -89,26 +89,9 @@ class McStasVirtualInstrument(IJob):
settings['display'] = ('boolean', {'label':'trace the 3D view of the simulation'})
settings['instrument'] = ('mcstas_instrument',{"label":'mcstas instrument','default' : os.path.join('..','..','..','Data','McStas','Instruments','Simple_ToF_Flat_Sample.out')})
settings['options'] = ('mcstas_options', {'label':'mcstas options'})
# settings['options'] = ('mcstas_options', {"label":'mcstas options'})
settings['parameters'] = ('mcstas_parameters', {'label':'instrument parameters',
'dependencies':{'instrument':'instrument'},
'exclude':['sample_coh','sample_inc']})
# settings['parameters'] = ('mcstas_parameters', {'label':'instrument parameters',
# 'dependencies':{"instrument":"instrument"},
# 'exclude':['sample_coh','sample_inc'],
# 'default' :{'beam_wavelength_Angs': 2.0,
# 'environment_thickness_m': 0.002,
# 'beam_resolution_meV': 0.1,
# 'container':os.path.join('..','..','..','Data','McStas','Samples','Al.laz'),
# 'container_thickness_m': 5e-05,
# 'sample_height_m': 0.05,
# 'environment':os.path.join('..','..','..','Data','McStas','Samples','Al.laz'),
# 'environment_radius_m': 0.025,
# 'sample_thickness_m': 0.001,
# 'sample_detector_distance_m': 4.0,
# 'sample_width_m': 0.02,
# 'sample_rotation_deg': 45.0,
# 'detector_height_m': 3.0}})
settings['output_files'] = ('output_files', {'formats':["netcdf","ascii"]})
def initialize(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment