Skip to content

Commit

Permalink
remove hardcoded CWL block
Browse files Browse the repository at this point in the history
  • Loading branch information
rozyczko committed Aug 15, 2024
1 parent 4bc8e15 commit ab599a4
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions easyDiffractionApp/Logic/Experiment.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,16 +280,6 @@ def loadExperimentFromCifString(self, cifString="", job_name=""):
self.defined = bool(len(self._dataBlocksNoMeas))
self._job.interface = self._interface

# FIXME: REMOVE HARDCODED CWL
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type'] = {}
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['value'] = 'cwl'
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['category'] = '_diffrn_radiation'
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['prettyCategory'] = 'radiation'
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['name'] = 'type'
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['prettyName'] = ''
self._dataBlocksNoMeas[0]['params']['_diffrn_radiation']['type']['fittable'] = False
self.dataBlocksChanged.emit()

def jobToBlock(self, job=None):
'''
Convert a Job object to a list of data blocks, without the measured data
Expand All @@ -316,6 +306,17 @@ def jobToBlock(self, job=None):
url = url + category,
cifDict = cifDict
))
name = 'type'
dataBlock[param][category][name] = dict(Parameter(
value = 'cwl', # This needs proper parsing in the library
permittedValues = ['cwl', 'tof'],
optional = True,
category = category,
name = name,
shortPrettyName = name,
url = url + category,
cifDict = cifDict
))
name = 'wavelength'
category = '_diffrn_radiation_wavelength'
prettyCategory = 'radiation'
Expand Down

0 comments on commit ab599a4

Please sign in to comment.