Commit 289d2427 authored by Cristina Cocho's avatar Cristina Cocho
Browse files

Added gui files related to spectro

parent 880cd7ca
......@@ -36,13 +36,24 @@ D22SampleSequencer::~D22SampleSequencer() {
}
void D22SampleSequencer::execute(const string& command, bool blocking, bool logging) { //necessary?
spectroController->mode = QE65000Controller::SEQUENCE;
SampleSequencer::execute(command, blocking, logging);
//Once the last count is done force to do another spectro measure
//temporary until sampleSequencer is migrated
if (command == START_COMMAND) {
m_StartActivated = true;
spectroController->mode = QE65000Controller::SEQUENCE;
SampleSequencer::execute(command, blocking, logging);
//Once the last count is done force to do another spectro measure
doLastMeasure();
m_StartActivated = false;
spectroController->mode = QE65000Controller::ALONE;
} else if (command == STOP_COMMAND) {
m_StartActivated = false;
SampleSequencer::execute(command, blocking, logging);
}
spectroController->mode = QE65000Controller::ALONE;
}
void D22SampleSequencer::postConfiguration() {
......@@ -77,24 +88,28 @@ void D22SampleSequencer::refreshSetValue(string propertyName, const boost::any a
void D22SampleSequencer::getSpectro() {
spectroController->start();
//Copy data in nexus file (remember it is delayed in one position)
if (actualSlotNumber > 1) {
if (actualSlotNumber > 1 && m_StartActivated) {
int32 numor = any_cast<int32>(m_Count->getValue("numor"));
cout << "appending data to nexus file! (1)" << endl;
NexusDataFile::appendTo(numor - 1, "NxD22SpecialServerFile.xml", "NxD22SpecialClientFile.xml");
}
}
void D22SampleSequencer::doLastMeasure() {
//Last measure = move sample (using sampleChanger) + get spectro + save data in nexus file
Sender<ClientCommand>::begin();
Sender<ClientCommand>::post(ClientCommand(m_sampleChanger, START_COMMAND));
Sender<ClientCommand>::endIf();
if (m_StartActivated) {
//Last measure = move sample (using sampleChanger) + get spectro + save data in nexus file
Sender<ClientCommand>::begin();
Sender<ClientCommand>::post(ClientCommand(m_sampleChanger, START_COMMAND));
Sender<ClientCommand>::endIf();
spectroController->start();
int32 numor = any_cast<int32>(m_Count->getValue("numor"));
NexusDataFile::appendTo(numor, "NxD22SpecialServerFile.xml", "NxD22SpecialClientFile.xml");
spectroController->start();
int32 numor = any_cast<int32>(m_Count->getValue("numor"));
cout << "appending data to nexus file! (2) " << numor << endl;
NexusDataFile::appendTo(numor, "NxD22SpecialServerFile.xml", "NxD22SpecialClientFile.xml");
// cout << "adding new data (theoretically) in data file: " << numor << " value of last numor: " << lastNumor << endl;
}
}
}
......
......@@ -27,7 +27,7 @@ using namespace spectrometer;
namespace d22special {
class D22SampleSequencer: public ::SampleSequencer {
class D22SampleSequencer: public ::SampleSequencer{
public:
......@@ -57,6 +57,8 @@ private:
int32 actualSlotNumber;
int32 lastNumor;
bool m_StartActivated;
};
}
......
d22_sample_sequencer.changer_numberPrefix=Changer name
d22_sample_sequencer.slotPrefix=Slot
d22_sample_sequencer.acquisitionTimePrefix=Duration
d22_sample_sequencer.titlePrefix=Run Title
d22_sample_sequencer.transmissionPrefix=Transmission
d22_sample_sequencer.thicknessPrefix=Thickness
d22_sample_sequencer.shortSlotPrefix=Slot
d22_sample_sequencer.shortAcquisitionTimePrefix=Time
d22_sample_sequencer.shortTitlePrefix=Title
d22_sample_sequencer.shortTransmissionPrefix=Trans
d22_sample_sequencer.shortThicknessPrefix=Thick
d22_sample_sequencer.samplechangerGroup=Sample Changer
d22_sample_sequencer.acquisitionGroup=Acquisition
d22_sample_sequencer.slotLabel=Used Slots
d22_sample_sequencer.maxSlotLabel=Max Slots
d22_sample_sequencer.totalTimeLabel=Total Time
d22_sample_sequencer.changer_numberPrefix=Changer #
d22_sample_sequencer.wanted_nbpositionLabel=Wanted number of positions
# Radio buttons h/m/s
d22_sample_sequencer.hValue=h
d22_sample_sequencer.hLabel=h
d22_sample_sequencer.mValue=m
d22_sample_sequencer.mLabel=m
d22_sample_sequencer.sValue=s
d22_sample_sequencer.sLabel=s
# Time-Monitor switcher
d22_sample_sequencer.timeValue=time
d22_sample_sequencer.timeLabel=Time
d22_sample_sequencer.timeImage=MODE_TIME
d22_sample_sequencer.countsImage=MODE_COUNTS
d22_sample_sequencer.countsValue=counts
d22_sample_sequencer.countsLabel=Monitor
#values and labels
d22_sample_sequencer.changer1Value=1
d22_sample_sequencer.changer1Label=Changer#1
d22_sample_sequencer.changer2Value=2
d22_sample_sequencer.changer2Label=Changer#2
d22_sample_sequencer.changer3Value=3
d22_sample_sequencer.changer3Label=Changer#3
d22_sample_sequencer.changer4Value=4
d22_sample_sequencer.changer4Label=Changer#4
d22_sample_sequencer.changer5Value=5
d22_sample_sequencer.changer5Label=Changer#5
d22_sample_sequencer.changer6Value=6
d22_sample_sequencer.changer6Label=Changer#6
d22_sample_sequencer.changer7Value=7
d22_sample_sequencer.changer7Label=Changer#7
d22_sample_sequencer.setFollowingValuesMessage=Set following values to current one
d22_sample_sequencer.incrementFollowingValuesMessage=Autofill following incrementally
\ No newline at end of file
<controller_plugin_config type="d22_sample_sequencer">
<image key="SAMPLE_CHANGER"/>
<settings view="d22_sample_sequencerView.xml">
<plugin class="SampleSequencerControllerSetupPlugin"/>
<swt_plugin_peer class="SWTSampleSequencerControllerSetupPluginPeer"/>
</settings>
</controller_plugin_config>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="d22_sample_sequencer">
<property name="wanted_nbposition" type="Long" max_length="3">
<property_range min_property="min_slot" max_property="max_slot"/>
</property>
<property name="min_slot" type="Long">
</property>
<property name="max_slot" type="Long">
</property>
<property name="mode" type="String">
</property>
<property name="changer_number" type="Long">
</property>
<property name="time_type" type="String">
</property>
<property name="total_time" type="Double" max_length="8">
<decimal_format nb_decimal_places="2"/>
</property>
<dynamic_property name="wanted_sample_position" size_property="wanted_nbposition" type="Long" max_length="3">
<property_range min_property="min_slot" max_property="max_slot"/>
</dynamic_property>
<dynamic_property name="wanted_acquisition_time" size_property="wanted_nbposition" type="Double" max_length="8">
<decimal_format nb_decimal_places="2"/>
</dynamic_property>
<dynamic_property name="wanted_acquisition_title" size_property="wanted_nbposition" type="String" max_length="30">
</dynamic_property>
<dynamic_property name="thickness" size_property="wanted_nbposition" type="Double" max_length="6">
<decimal_format nb_decimal_places="2"/>
</dynamic_property>
<dynamic_property name="transmission" size_property="wanted_nbposition" type="Double" max_length="6">
<decimal_format nb_decimal_places="2"/>
</dynamic_property>
</controller>
<plugin>
<controller type="d22_sample_sequencer" role="d22_sample_sequencer1"/>
<group title="d22_sample_sequencer.acquisitionGroup">
<image_button role="d22_sample_sequencer1" property="mode" valuesAndImages="d22_sample_sequencer.time,d22_sample_sequencer.counts"/>
<property_switcher role="d22_sample_sequencer1" property="mode" switcher_key="acquisitionModeSwitcher"/>
<switchable_composite switch_values="time" switcher_key="acquisitionModeSwitcher">
<radio role="d22_sample_sequencer1" property="time_type" valuesAndLabels="d22_sample_sequencer.h,d22_sample_sequencer.m,d22_sample_sequencer.s" spaceBefore="false"/>
</switchable_composite>
</group>
<newLine/>
<group title="d22_sample_sequencer.samplechangerGroup">
<combo role="d22_sample_sequencer1" property="changer_number" valuesAndLabels="d22_sample_sequencer.changer1,d22_sample_sequencer.changer2,d22_sample_sequencer.changer3,d22_sample_sequencer.changer4,d22_sample_sequencer.changer5,d22_sample_sequencer.changer6,d22_sample_sequencer.changer7" prefix="d22_sample_sequencer.changer_numberPrefix" key="changerNumberCombo"/>
<label role="d22_sample_sequencer1" prefix="d22_sample_sequencer.maxSlotLabel" property="max_slot"/>
<newLine/>
<text role="d22_sample_sequencer1" prefix="d22_sample_sequencer.wanted_nbpositionLabel" property="wanted_nbposition" key="wantedNbPositionText"/>
</group>
<newLine/>
<table_composite nbColumns="10" border="true">
<simple_label prefix="d22_sample_sequencer.slotPrefix" font_size="10" font_style="BOLD" horizontal_span="2" hAlignment="center"/>
<simple_label prefix="d22_sample_sequencer.acquisitionTimePrefix" font_size="10" font_style="BOLD" horizontal_span="2" hAlignment="center"/>
<simple_label prefix="d22_sample_sequencer.titlePrefix" font_size="10" font_style="BOLD" horizontal_span="2" hAlignment="center"/>
<simple_label prefix="d22_sample_sequencer.transmissionPrefix" font_size="10" font_style="BOLD" horizontal_span="2" hAlignment="center"/>
<simple_label prefix="d22_sample_sequencer.thicknessPrefix" font_size="10" font_style="BOLD" horizontal_span="2" hAlignment="center"/>
<dynamic_composite role="d22_sample_sequencer1" properties="wanted_sample_position,wanted_acquisition_time,wanted_acquisition_title,transmission,thickness,copyPositionButton,copyTimeButton,copyTitleButton,copyTransmissionButton,copyThicknessButton,title">
<simple_image role="d22_sample_sequencer1" property="wanted_sample_position" key="copyPositionButton" prefix="ARROW_DOWN" height="10"/>
<text role="d22_sample_sequencer1" property="wanted_sample_position" font_size="10"/>
<simple_image role="d22_sample_sequencer1" property="wanted_acquisition_time" key="copyTimeButton" prefix="ARROW_DOWN" height="10"/>
<text role="d22_sample_sequencer1" property="wanted_acquisition_time" font_size="10"/>
<simple_image role="d22_sample_sequencer1" property="wanted_acquisition_title" key="copyTitleButton" prefix="ARROW_DOWN" height="10"/>
<text role="d22_sample_sequencer1" property="wanted_acquisition_title" font_size="10" key="title"/>
<simple_image role="d22_sample_sequencer1" property="transmission" key="copyTransmissionButton" prefix="ARROW_DOWN" height="10"/>
<text role="d22_sample_sequencer1" property="transmission" font_size="10"/>
<simple_image role="d22_sample_sequencer1" property="thickness" key="copyThicknessButton" prefix="ARROW_DOWN" height="10"/>
<text role="d22_sample_sequencer1" property="thickness" font_size="10"/>
</dynamic_composite>
</table_composite>
<newLine/>
<composite>
<label role="d22_sample_sequencer1" prefix="d22_sample_sequencer.totalTimeLabel" property="total_time"/>
<label role="d22_sample_sequencer1" property="time_type" spaceBefore="false"/>
</composite>
</plugin>
......@@ -61,8 +61,7 @@ void QE65000Controller::postConfiguration() {
this);
//need to register the progression to see it??
registerProgression(spectroDriver, &QE65000Controller::updateProgression,
this);
registerProgression(spectroDriver, &QE65000Controller::updateProgression, this);
//Set initial property values
spectroStatusMessage.update("UNPLUGGED");
......
dualSwitchSpectro1.number_cyclesPrefix=Number of cycles:
dualSwitchSpectro1.side_timePrefix=Time For Side:
dualSwitchSpectro1.side_timeSuffix= s
dualSwitchSpectro1.y_rightData_legend=Right Data
dualSwitchSpectro1.y_leftData_legend=Left Data
dualSwitchSpectro1.plotTitle= Dual Spectrum
dualSwitchSpectro1.plotXAxisLegend=Wavelength
dualSwitchSpectro1.plotYAxisLegend=Value
\ No newline at end of file
<plugin>
<controller type="dualSwitchSpectro" role="dualSwitchSpectro1"/>
<text role="dualSwitchSpectro1" property="number_cycles" prefix="dualSwitchSpectro1.number_cyclesPrefix"/>
<text role="dualSwitchSpectro1" property="side_time" prefix="dualSwitchSpectro1.side_timePrefix" suffix="dualSwitchSpectro1.side_timeSuffix"/>
<plot_launcher role="dualSwitchSpectro1" data="rightData,leftData" title="dualSwitchSpectro1.plotTitle" height="20"/>
</plugin>
<plotdatas>
<plotdata key="rightData" legend_key="dualSwitchSpectro1.y_rightData_legend" color="1F96C0" plugins="COMMAND|SETUP">
<!-- <dataX p_role="dualSwitchSpectro1" p_name="x_data"/> -->
<dataY p_role="dualSwitchSpectro1" p_name="y_rightData"/>
</plotdata>
<plotdata key="leftData" legend_key="dualSwitchSpectro1.y_leftData_legend" color="990000" plugins="COMMAND|SETUP">
<!-- <dataX p_role="dualSwitchSpectro1" p_name="x_data"/> -->
<dataY p_role="dualSwitchSpectro1" p_name="y_leftData"/>
</plotdata>
</plotdatas>
<controller_plugin_config type="dualSwitchSpectro">
<image key="BARRILET"/>
<settings view="dualSwitchSpectroView.xml"/>
<command view="dualSwitchSpectroCommandView.xml"/>
</controller_plugin_config>
<controller type="dualSwitchSpectro">
<property name="isCommand" type="boolean">
</property>
<property name="number_cycles" type="int32">
</property>
<property name="side_time" type="float64">
</property>
<property name="execution_status" type="string">
</property>
<property name="x_data" type="doublearray">
</property>
<property name="y_rightData" type="doublearray">
</property>
<property name="y_leftData" type="doublearray">
</property>
</controller>
<plugin>
<controller type="dualSwitchSpectro" role="dualSwitchSpectro1"/>
<text role="dualSwitchSpectro1" property="number_cycles" prefix="dualSwitchSpectro1.number_cyclesPrefix"/>
<newLine/>
<text role="dualSwitchSpectro1" property="side_time" prefix="dualSwitchSpectro1.side_timePrefix" suffix="dualSwitchSpectro1.side_timeSuffix"/>
<newLine/>
<plot_launcher role="dualSwitchSpectro1" data="rightData,leftData" title="dualSwitchSpectro1.plotTitle" x_axis_title="dualSwitchSpectro1.plotXAxisLegend" y_axis_title="dualSwitchSpectro1.plotYAxisLegend" height="20"/>
<summary>
<summary_content>
<label role="dualSwitchSpectro1" property="execution_status"/>
</summary_content>
</summary>
</plugin>
spectro1.integration_timePrefix=Integration Time:
spectro1.integration_timeSuffix=microseconds
spectro1.plotTitle=Spectrum
spectro1.plotXAxisLegend=Wavelength
spectro1.plotYAxisLegend=
spectro1.dataLegend=Data
spectro1.scansToAverage=Scans to average
<plugin>
<controller type="spectro" role="spectro1"/>
<text role="spectro1" property="integration_time" prefix="spectro1.integration_timePrefix" suffix="spectro1.integration_timeSuffix"/>
<plot_launcher role="spectro1" data="data" title="spectro1.plotTitle" x_axis_title="spectro1.plotXAxisLegend" y_axis_title="spectro1.plotYAxisLegend" height="20"/>
</plugin>
<plotdatas>
<plotdata key="data" legend_key="spectro1.dataLegend" color="1F96C0" plugins="COMMAND|SETUP">
<dataX p_role="spectro1" p_name="x_data"/>
<dataY p_role="spectro1" p_name="y_data"/>
</plotdata>
</plotdatas>
<controller_plugin_config type="spectro">
<image key="SHUTTER"/>
<settings view="spectroView.xml"/>
<command view="spectroCommandView.xml"/>
</controller_plugin_config>
<?xml version="1.0" encoding="ISO-8859-1" ?>
<controller type="spectro">
<property name="integration_time" type="int32">
</property>
<property name="x_data" type="doublearray">
</property>
<property name="y_data" type="doublearray">
</property>
<property name="spectro_status_message" type="string">
</property>
<property name="plot_name" type="string">
</property>
<property name="numor" type="Long">
</property>
<property name="scans_average" type="Long" max_length="2">
<strictly_positive/>
</property>
</controller>
<plugin>
<controller type="spectro" role="spectro1"/>
<text role="spectro1" property="integration_time" prefix="spectro1.integration_timePrefix" suffix="spectro1.integration_timeSuffix"/>
<newline/>
<plot_launcher role="spectro1" data="data" title="spectro1.plotTitle" x_axis_title="spectro1.plotXAxisLegend" y_axis_title="spectro1.plotYAxisLegend" height="20"/>
<newline/>
<text role="spectro1" property="scans_average" prefix="spectro1.scansToAverage"/>
<summary>
<summary_content>
<label role="spectro1" property="spectro_status_message"/>
</summary_content>
</summary>
</plugin>
QE650001.integration_time=Integration Time:
\ No newline at end of file
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