<?xml version="1.0"?>
<wizard title="AutoTune wizard" pic="Autotune.bmp" reg="Quad Autotune" size="500,440">

  <page border="5" id="Introduction">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    
    <text background="blue" bold="true" expand="true" height="30">Introduction</text>
    <text>This wizard will take you through optimizing tune page parameters and MS method development.</text>
    <spacer height="10"></spacer>
    <text>Ensure the instrument is in operate and a suitable solution is being infused.</text>
    
    <spacer height="40"></spacer>
    <text background="blue" bold="true" expand="true" height="30">Set-up</text>
    <text>Select one or more of the options below.</text>
    <spacer height="20"></spacer>

    <row>
      <text width="200" valuelink="FULL_AUTOTUNE_TEXT">AutoTune - Full</text>
      <checkbox valuelink="FULL_AUTOTUNE" reglink="FULL_AUTOTUNE">1</checkbox>
    </row>
    <row>
      <text width="200">Tune check</text>
      <checkbox valuelink="TUNE_CHECK" reglink="TUNE_CHECK"></checkbox>
    </row>
    <row>
      <text width="200">Calibrate Instrument</text>
      <checkbox valuelink="CALIBRATE_INSTRUMENT" reglink="CALIBRATE_INSTRUMENT"></checkbox>
    </row>
    <row>
      <text width="200">Calibrate check</text>
      <checkbox valuelink="CALIBRATE_CHECK" reglink="CALIBRATE_CHECK"></checkbox>
    </row>
    <row>
      <text width="200">Develop SIR Method</text>
      <checkbox valuelink="DEVELOP_SIR" reglink="DEVELOP_SIR"></checkbox>
    </row>
    <row valuelink="DEVELOP_MRM_OPTION">
      <text width="200">Develop MRM Method</text>
      <checkbox valuelink="DEVELOP_MRM" reglink="DEVELOP_MRM"></checkbox>
    </row>
  </page>

  <page border="5" id="File Inputs">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    
    <overlay>
    <column valuelink="TUNE_FILE_CREATION_OPTION">
      <text background="blue" bold="true" expand="true" height="30">Tune method creation</text>
      <text>The tune parameters will be stored in the method specified below.</text>
      <spacer height="10"></spacer>
      <text>Please enter appropriate name.</text>
    </column>
    <column valuelink="TUNE_FILE_UPDATE_OPTION">
      <text background="blue" bold="true" expand="true" height="30">Tune method update</text>
      <text>Please select appropriate tune method. AutoTune will modify the source parameters of this method.</text>
      <spacer height="10"></spacer>
      <text>Please enter the method name to use.</text>
    </column>
    <column valuelink="TUNE_FILE_OPEN_OPTION">
      <text background="blue" bold="true" expand="true" height="30">Tune method</text>
      <text>The tune parameters will be loaded from the method below.</text>
      <spacer height="10"></spacer>
      <text>Please enter the method name to use.</text>
    </column>
    </overlay>
    <spacer height="10"></spacer>

    <row> 
      <text width="110">MS method name:</text>
      <edit valuelink="MS_FILENAME" reglink="MS_FILENAME">MS</edit>
    </row>
    
    <spacer height="20"></spacer>

    <column valuelink="ADJUST_DEFAULT_TEMPERATURE_OPTION">
      <text>Set temperatures and gas flow appropriate for LC flow rate.</text>
      <spacer height="10"></spacer>
    
      <row>
        <text>Adjust default temperatures and gas flow</text>
        <spacer width="10"></spacer>
        <checkbox valuelink="ADJUST_DEFAULT_TEMPERATURES"></checkbox>
      </row>
    </column>
    <spacer height="10"></spacer>

    <column valuelink="TEMPERATURE_SETTINGS">
      <row>
        <text width="180">Source temperature (C)</text>
        <doubleedit range="20,150" valuelink="SOURCE_TEMPERATURE" reglink="SOURCE_TEMPERATURE">150</doubleedit>
      </row>
      <row>
        <text width="180" valuelink="PROBE_DESOL_TEMP_TEXT">Desolvation temperature (C)</text>
        <doubleedit range="20,650" decimal_places="0" valuelink="DESOLVATION_TEMPERATURE" reglink="DESOLVATION_TEMPERATURE">250</doubleedit>
      </row>
      <row>
        <text width="180">Desolvation gas flow (L/hr)</text>
        <doubleedit range="0,1200" decimal_places="0" valuelink="DESOLVATION_GAS_FLOW" reglink="DESOLVATION_GAS_FLOW">500</doubleedit>
      </row>
    </column>
    <connect from="ADJUST_DEFAULT_TEMPERATURES" signal="CHANGED" to="TEMPERATURE_SETTINGS" slot="SHOW"></connect>
  </page>

  <page border="5" id="Calibration Inputs">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    <text background="blue" bold="true" expand="true" height="30">Calibration</text>
    <text>Select an appropriate calibration reference.</text>
    <spacer height="10"></spacer>

    <row>
     <text width="160">Reference:</text>
     <edit valuelink="CALIBRATION_REFERENCE_FILE" reglink="CALIBRATION_REFERENCE_FILE">naics2</edit>
    </row>
    <spacer height="20"></spacer>
    <overlay>
	    <text valuelink="CAL_FILE_CREATION_OPTION">The calibration will be saved to the name specified below.</text>
	    <text valuelink="CAL_FILE_LOAD_OPTION">The calibration will be opened from the name specified below.</text>
	</overlay>
	<spacer height="10"></spacer>
    <row>
      <text width="160">Calibration name:</text>
      <edit valuelink="CALIBRATION_FILENAME" reglink="CALIBRATION_FILENAME">calibration</edit>
    </row>

    <spacer height="20"></spacer>

    <text background="blue" bold="true" expand="true" height="30">Calibration range</text>
    <text>Select desired mass range and scan speed.</text>
    <spacer height="10"></spacer>
    <row>
      <text width="100">Low Mass (Da):</text>
      <doubleedit valuelink="CALIBRATION_START_MASS" reglink="CALIBRATION_START_MASS">2.0</doubleedit>
      <spacer width="10"></spacer>
      <text width="100">High Mass (Da):</text>
      <doubleedit valuelink="CALIBRATION_END_MASS" reglink="CALIBRATION_END_MASS">2040.0</doubleedit>
    </row>
    <row>
      <text width="100">Slow Speed (s):</text>
      <doubleedit valuelink="CALIBRATION_SLOW_SPEED" reglink="CALIBRATION_SLOW_SPEED">6</doubleedit>
      <spacer width="10"></spacer>
      <text width="100">Fast Speed (s):</text>
      <doubleedit valuelink="CALIBRATION_FAST_SPEED" reglink="CALIBRATION_FAST_SPEED">0.2</doubleedit>
    </row>
    <spacer height="10"></spacer>
    <row>
      <text>Print Calibration Report</text>
      <spacer width="5"></spacer>
      <checkbox valuelink="CALIBRATION_PRINT_REPORT" reglink="CALIBRATION_PRINT_REPORT"></checkbox>
    </row>
  </page>

  <page border="5" id="Mass Inputs">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    <text background="blue" bold="true" expand="true" height="30">Mass Input</text>
    <spacer height="10"></spacer>

    <column valuelink="PEAK_MASS_SELECTION_OPTION">
      <row>
        <button valuelink="GET_MASSES_FROM_TUNE_PAGE">Fill values from tune page</button>
        <spacer width="20"></spacer>
        <button valuelink="GET_MASSES_FROM_CAL_FILE">Fill from reference</button>
        <connect from="CALIBRATE_INSTRUMENT" signal="CHANGED" to="GET_MASSES_FROM_CAL_FILE" slot="SHOW"></connect>
      </row>
      <spacer height="20"></spacer>
      <row>
        <checkbox valuelink="USE_PEAK_MASS_1" reglink="USE_PEAK_MASS_1">1</checkbox>
        <spacer width="5"></spacer>
        <text>Mass 1:</text>
        <spacer width="10"></spacer>
        <doubleedit valuelink="PEAK_MASS_1" reglink="PEAK_MASS_1">172.88</doubleedit>
        <connect from="USE_PEAK_MASS_1" signal="CHANGED" to="PEAK_MASS_1" slot="ENABLE"></connect>
        <spacer width="10"></spacer>
        <text>Span 1:</text>
        <spacer width="10"></spacer>
        <doubleedit decimal_places="0" valuelink="PEAK_SPAN_1" reglink="PEAK_SPAN_1">8.0</doubleedit>
        <connect from="USE_PEAK_MASS_1" signal="CHANGED" to="PEAK_SPAN_1" slot="ENABLE"></connect>
      </row>
      <row>
        <checkbox valuelink="USE_PEAK_MASS_2" reglink="USE_PEAK_MASS_2">1</checkbox>
        <spacer width="5"></spacer>
        <text>Mass 2:</text>
        <spacer width="10"></spacer>
        <doubleedit valuelink="PEAK_MASS_2" reglink="PEAK_MASS_2">472.67</doubleedit>
        <connect from="USE_PEAK_MASS_2" signal="CHANGED" to="PEAK_MASS_2" slot="ENABLE"></connect>
        <spacer width="10"></spacer>
        <text>Span 2:</text>
        <spacer width="10"></spacer>
        <doubleedit decimal_places="0" valuelink="PEAK_SPAN_2" reglink="PEAK_SPAN_2">8.0</doubleedit>
        <connect from="USE_PEAK_MASS_2" signal="CHANGED" to="PEAK_SPAN_2" slot="ENABLE"></connect>
      </row>
      <row>
        <checkbox valuelink="USE_PEAK_MASS_3" reglink="USE_PEAK_MASS_3">1</checkbox>
        <spacer width="5"></spacer>
        <text>Mass 3:</text>
        <spacer width="10"></spacer>
        <doubleedit valuelink="PEAK_MASS_3" reglink="PEAK_MASS_3">1072.25</doubleedit>
        <connect from="USE_PEAK_MASS_3" signal="CHANGED" to="PEAK_MASS_3" slot="ENABLE"></connect>
        <spacer width="10"></spacer>
        <text>Span 3:</text>
        <spacer width="10"></spacer>
        <doubleedit decimal_places="0" valuelink="PEAK_SPAN_3" reglink="PEAK_SPAN_3">8.0</doubleedit>
        <connect from="USE_PEAK_MASS_3" signal="CHANGED" to="PEAK_SPAN_3" slot="ENABLE"></connect>
      </row>
      <row>
        <checkbox valuelink="USE_PEAK_MASS_4" reglink="USE_PEAK_MASS_4">1</checkbox>
        <spacer width="5"></spacer>
        <text>Mass 4:</text>
        <spacer width="10"></spacer>
        <doubleedit valuelink="PEAK_MASS_4" reglink="PEAK_MASS_4">1971.61</doubleedit>
        <connect from="USE_PEAK_MASS_4" signal="CHANGED" to="PEAK_MASS_4" slot="ENABLE"></connect>
        <spacer width="10"></spacer>
        <text>Span 4:</text>
        <spacer width="10"></spacer>
        <doubleedit decimal_places="0" valuelink="PEAK_SPAN_4" reglink="PEAK_SPAN_4">8.0</doubleedit>
        <connect from="USE_PEAK_MASS_4" signal="CHANGED" to="PEAK_SPAN_4" slot="ENABLE"></connect>
      </row>
    </column>
    
    <spacer height="30"></spacer>
    <column valuelink="TARGET_RESOLUTION_OPTION">
      <text background="blue" bold="true" expand="true" height="30">AutoTune</text>
      <text>Select the desired peak width at half height.</text>
      <spacer height="10"></spacer>
      <row>
        <text width="200" valuelink="MS1_TARGET_RESOLUTION_TEXT">MS1 Target Resolution FWHM (Da):</text>
        <doubleedit range="0.1,10" valuelink="TARGET_RESOLUTION_MS1" reglink="TARGET_RESOLUTION_MS1">0.5</doubleedit>
      </row>
      <row valuelink="MS2_TARGET_RESOLUTION_OPTION">
        <text width="200">MS2 Target Resolution FWHM (Da):</text>
        <doubleedit range="0.1,10" valuelink="TARGET_RESOLUTION_MS2" reglink="TARGET_RESOLUTION_MS2">1.0</doubleedit>
      </row>
    </column>
  </page>
  <connect from="FULL_AUTOTUNE" signal="CHANGED" to="TARGET_RESOLUTION_OPTION" slot="SHOW"></connect>

  <page border="5" id="Ramp Inputs">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    <text background="blue" bold="true" expand="true" height="30">Cone voltage range</text>
    <row>
      <text width="160">Cone voltage start:</text>
      <doubleedit range="0,350" valuelink="CONE_VOLTAGE_START" reglink="CONE_VOLTAGE_START">0</doubleedit>
    </row>
    <row>
      <text width="160">Cone voltage end:</text>
      <doubleedit range="0,350" valuelink="CONE_VOLTAGE_END" reglink="CONE_VOLTAGE_END">100</doubleedit>
    </row>
    <row>
      <text width="160">Cone voltage step size:</text>
      <doubleedit range="0,350" valuelink="CONE_VOLTAGE_STEP_SIZE" reglink="CONE_VOLTAGE_STEP_SIZE">5</doubleedit>
    </row>
    <spacer height="10"></spacer>

    <column valuelink="MRM_RAMP_OPTIONS">
      <text background="blue" bold="true" expand="true" height="30">Collision energy range</text>
      <row>
        <text width="160">Collision energy start:</text>
        <doubleedit range="0,200" valuelink="COLLISION_ENERGY_START" reglink="COLLISION_ENERGY_START">10</doubleedit>
      </row>
      <row>
        <text width="160">Collision energy end:</text>
        <doubleedit range="0,200" valuelink="COLLISION_ENERGY_END" reglink="COLLISION_ENERGY_END">50</doubleedit>
      </row>
      <row>
        <text width="160">Collision energy step size:</text>
        <doubleedit range="0,200" valuelink="COLLISION_ENERGY_STEP_SIZE" reglink="COLLISION_ENERGY_STEP_SIZE">2</doubleedit>
      </row>

      <spacer height="10"></spacer>
    
      <text background="blue" bold="true" expand="true" height="30">Product scan search details</text>
      <row>
        <text width="200">Number of product transitions:</text>
        <doubleedit decimal_places="0" range="1,3" valuelink="NUMBER_OF_DAUGHTERS" reglink="NUMBER_OF_DAUGHTERS">1</doubleedit>
      </row>
      <row>
        <text width="200">Lowest fragment ion mass (Da):</text>
        <doubleedit range="2,3000" valuelink="LOWEST_DAUGHTER_ION" reglink="LOWEST_DAUGHTER_ION">70.0</doubleedit>
      </row>
    </column>
  </page>
  <connect from="DEVELOP_MRM" signal="CHANGED" to="MRM_RAMP_OPTIONS" slot="SHOW"></connect>

  <page id="Validation Inputs" border="5" active="false">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    <column valuelink="VALIDATION_OPTION">
      <text background="blue" bold="true" expand="true" height="30">Validation</text>
      <spacer height="10"></spacer>
      <row>
        <text>Save acquired optimization data for validation?</text>
        <spacer width="10" height = "0"></spacer>
        <checkbox valuelink="SAVE_EXPERIMENT_FILES" reglink="SAVE_EXPERIMENT_FILES"></checkbox>
      </row>
      <spacer height="20"></spacer>
      
      <text valuelink="SAVE_EXPERIMENT_FILES_TEXT">Acquired optimization data will be saved to the files below.</text>
      <spacer height="20"></spacer>
      <row valuelink="CONE_VOLTAGE_OPTIMISE_EXPERIMENT_OPTION">
        <text width="230">Cone voltage optimize stage data file:</text>
        <edit valuelink="CONE_VOLTAGE_OPTIMISE_EXPERIMENT" reglink="CONE_VOLTAGE_OPTIMISE_EXPERIMENT">Cone</edit>
      </row>
      <row valuelink="DAUGHTER_SEARCH_EXPERIMENT_OPTION">
        <text width="230">Daughter search stage data file:</text>
        <edit valuelink="DAUGHTER_SEARCH_EXPERIMENT" reglink="DAUGHTER_SEARCH_EXPERIMENT">Daughter</edit>
      </row>
    </column>
  </page>

  <page border="5" id="Ready">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>

    <text background="blue" bold="true" expand="true" height="30">About to begin</text>
    <spacer height="10"></spacer>
    <text>The wizard is about to begin data acquisition, please ensure:</text>
    <spacer height="10"></spacer>
    <row>
      <spacer width="20"></spacer>
      <column>
        <text>- The API gas flow is on.</text>
        <text>- The Instrument is in operate.</text>
        <text>- The temperature and other readbacks are correct.</text>
	<text>- The infusion flow is on.</text>
	<text>- There is sufficient tuning solution.</text>
	<text>- The probe is correctly positioned.</text>
      </column>
    </row>

    <spacer height="20"></spacer>

	<column valuelink="FLUIDICS" show="false">
		<text background="blue" bold="true" expand="true" height="30">Fluidics setup</text>
		<text>This will refill the syringe with calibrant from the specified reservoir and start an infusion at 10uL/min</text>
		<spacer height="5"></spacer>
		<row>
			<text width="100">Setup fluidics:</text>
			<checkbox valuelink="SETUP_FLUIDICS" reglink="SETUP_FLUIDICS">0</checkbox>
	        <spacer width="100"></spacer>
			<text width="95">Combined flow:</text>
			<checkbox valuelink="FLUIDICS_COMBINDED_FLOW" reglink="FLUIDICS_COMBINDED_FLOW">0</checkbox>
		</row>
		<spacer height="5"></spacer>
		<row valuelink="FLUIDICS_RESERVOIR_OPTION">
			<text width="230">Reservoir A or B:</text>
			<combobox valuelink="FLUIDICS_RESERVOIR" reglink="FLUIDICS_RESERVOIR">
				<entry>
				  <name>A</name>
				</entry>
				<entry>
				  <name>B</name>
				</entry>
			</combobox>
		</row>
	</column>
    <connect from="SETUP_FLUIDICS" signal="CHANGED" to="FLUIDICS_RESERVOIR" slot="ENABLE"></connect>
    <connect from="SETUP_FLUIDICS" signal="CHANGED" to="FLUIDICS_COMBINDED_FLOW" slot="ENABLE"></connect>
  </page>
  
  <page border="5" id="Data Acquisition">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>

    <text background="blue" bold="true" expand="true" height="30">Progress</text>
    <spacer height="10"></spacer>

    <text expand="true" valuelink="CURRENT_PROGRESS_LABEL"></text>
    <progress height="15" valuelink="CURRENT_PROGRESS"></progress>
    <spacer height="15"></spacer>
    <text>Total progress:</text>
    <progress height="15" valuelink="TOTAL_PROGRESS"></progress>
    <spacer height="20"></spacer>
    <button valuelink="PROGRESS_DETAILS_BUTTON" show="false">Show Details...</button>
  </page>

  <page border="5" id="Output">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    
    <text background="blue" bold="true" expand="true" height="30">Write Experiments</text>
    <text>The developed methods will be saved to the names below.</text>
    <spacer height="10"></spacer>
    <row valuelink="SIR_OUTPUT_OPTION">
      <text width="95">SIR method name:</text>
      <edit valuelink="SIR_OUTPUT_FILENAME" reglink="SIR_OUTPUT_FILENAME">SIR</edit>
    </row>
    <row valuelink="SIR_OUTPUT_OPTION2">
      <text width="95">SIR run time:</text>
        <doubleedit range="1,3600" valuelink="SIR_OUTPUT_RUNTIME" reglink="SIR_OUTPUT_RUNTIME">1.0</doubleedit>
    </row>
    <row valuelink="MRM_OUTPUT_OPTION">
      <text width="95">MRM method name:</text>
      <edit valuelink="MRM_OUTPUT_FILENAME" reglink="MRM_OUTPUT_FILENAME">MRM</edit>
    </row>
    <row valuelink="MRM_OUTPUT_OPTION2">
      <text width="95">MRM run time:</text>
        <doubleedit range="1,3600" valuelink="MRM_OUTPUT_RUNTIME" reglink="MRM_OUTPUT_RUNTIME">1.0</doubleedit>
    </row>
    <spacer height="20"></spacer>
    <text background="blue" bold="true" expand="true" height="30">Reporting</text>
    <row>
      <text>Produce AutoTune report</text>
      <spacer width="10"></spacer>
      <checkbox valuelink="PRODUCE_AUTOTUNE_REPORT" reglink="PRODUCE_AUTOTUNE_REPORT"></checkbox>
    </row>
    <spacer height="10"></spacer>
    
    <column valuelink="AUTOTUNE_REPORT_OPTION" show="false">
      <text>The report will be saved to the file below.</text>
      <spacer height="10"></spacer>
      <row>
        <text width="85">Report file name:</text>
        <edit valuelink="REPORT_OUTPUT_FILENAME" reglink="REPORT_OUTPUT_FILENAME">report</edit>
      </row>
    </column>
    <connect from="PRODUCE_AUTOTUNE_REPORT" signal="CHANGED" to="AUTOTUNE_REPORT_OPTION" slot="SHOW"></connect>
  </page>
  <connect from="DEVELOP_SIR" signal="CHANGED" to="SIR_OUTPUT_OPTION" slot="SHOW"></connect>
  <connect from="DEVELOP_SIR" signal="CHANGED" to="SIR_OUTPUT_OPTION2" slot="SHOW"></connect>
  <connect from="DEVELOP_MRM" signal="CHANGED" to="MRM_OUTPUT_OPTION" slot="SHOW"></connect>
  <connect from="DEVELOP_MRM" signal="CHANGED" to="MRM_OUTPUT_OPTION2" slot="SHOW"></connect>


  <page border="5" id="Finish">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"></spacer>
    <text background="green" bold="true" expand="true" height="30">Complete</text>
    <text>AutoTune successfully completed, select Finish.</text>
  </page>

  <page border="5" id="Autotune Error" active="false">
    <text alignment="centred" background="yellow" expand="true" font="arial bold" rounded="true" size="30">AutoTune Wizard</text>
    <spacer height="10"/>
    <text background="red" bold="true" expand="true" height="30">AutoTune failed.</text>
    <spacer height="10"/>
    <text valuelink="AUTOTUNE_FAILURE_TEXT">The AutoTune Wizard failed to optimize the instrument parameters</text>
    <spacer height="20"/>

    <row>
      <text bold="true">Reason:</text>
      <spacer width="20"></spacer>
      <text italic="true" width="230" height="70" valuelink="AUTOTUNE_FAILURE_REASON"></text>
    </row>
    
    <row valuelink="BEAM_CHECK_FAILURE_TEXT">
      <spacer width="20"/>
      <column>
        <row><text width="10">-</text><text>Ensure the span is large enough.</text></row>
        <row><text width="10">-</text><text>Check flow of tuning solution.</text></row>
        <row><text width="10">-</text><text>Check concentration of tuning solution.</text></row>
        <row><text width="10">-</text><text>Check selected masses are correct and within</text></row>
        <row><text width="10"> </text><text>selected windows.</text></row>
        <row><text width="10">-</text><text>Check instrument is in operate and gas flow and</text></row>
        <row><text width="10"> </text><text>temperature readbacks are correct.</text></row>
      </column>
    </row>
  </page>


</wizard>
