Skip to content

Commit

Permalink
Refs #master change cvs output format for TOPAZ
Browse files Browse the repository at this point in the history
  • Loading branch information
VickieLynch committed Sep 27, 2018
1 parent 38840da commit 061f295
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
20 changes: 12 additions & 8 deletions model/goniometer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1740,10 +1740,10 @@ def __init__(self, wavelength_control=False):
#Chi is +135 degrees as of October 2010.
self.chi = +135.0

#Make the angle info object
#Make the angle info object (after EPICS upgrade names changed)
self.gonio_angles = [
AngleInfo('Phi'),
AngleInfo('Omega'),
AngleInfo('BL12:Mot:goniokm:phi'),
AngleInfo('BL12:Mot:goniokm:omega'),
]

#-------------------------------------------------------------------------
Expand Down Expand Up @@ -1870,10 +1870,9 @@ def csv_make_header(self, fileobj, title, comment=""):
-----------
fileobj: an already open, writable file object.
"""
fileobj.write(csv_line( ["#Title:", title] ) )
fileobj.write(csv_line( ["#Comment:", comment] ) )
#Line of header info
fileobj.write(csv_line( [x.name for x in self.angles] + ['CountFor', 'CountValue', 'Comment'] ) )

fileobj.write(csv_line( ['Notes'] + [x.name for x in self.angles] + ['Wait For/n', 'Value'] ) )


#===============================================================================================
Expand All @@ -1889,13 +1888,18 @@ def csv_add_position(self, fileobj, angle_values, count_for, count_value, commen
(allowed, reason) = self.are_angles_allowed(angle_values, return_reason=True)
#Convert from internal to DAS units.
das_angles = [self.angles[i].internal_to_das(angle_values[i]) for i in xrange(len(self.angles))]
stopping_criterion = count_for
if stopping_criterion == "runtime":
stopping_criterion = "seconds"
elif stopping_criterion == "pcharge":
stopping_criterion = "BL12:Det:PCharge:C"
if not allowed:
#Can't reach this position
fileobj.write("#"" ----- ERROR! This sample orientation could not be achieved with the goniometer, because of '%s'. THE FOLLOWING LINE HAS BEEN COMMENTED OUT ------ ""\n" % reason )
fileobj.write('#' + csv_line( das_angles + [count_for, count_value, comment] ) )
fileobj.write('#' + csv_line( [comment] + das_angles + [stopping_criterion, count_value] ) )
else:
#They are okay
fileobj.write(csv_line( das_angles + [count_for, count_value, comment] ) )
fileobj.write(csv_line( [comment] + das_angles + [stopping_criterion, count_value] ) )



Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
formats = rpm

[bdist_rpm]
release = 9
release = 10
packager = ORNL NDAV
#doc_files = docs/user_guide.pdf
requires = numpy,scipy,python-traitsui,python-matplotlib-wx,Mayavi

0 comments on commit 061f295

Please sign in to comment.