DØ Central Fiber Tracker

Cryo/Bias

Database How-To


A brief but hopefully complete description of how to update the Cryo and Bias information in the online (Oracle) database. Start at point 7. if no bias/cryo phase V processing is required (board install only).

Prerequisites:

Access to DØserver4/projects, EXCEL, access to the online cluster, both with a personal account (for FTP) and as døcft. setup dØonline and setup onl_apps have been done.

Changes 2003-8-1:

  • abbreviated (online install only) version of point 7.
  • update cft_gui instructions according to Jadzia.

Changes 2003-4-10:

  • phase V data mirror on d0server4
  • all AFE boards are version 5: no more EPICS changes (unless cryoslots get moved around), no more rescaling
  • update of EPICS computational constants is done from CFT_GUI (no more 'truexxx' scripts)

Notes:

The cryo calibration analysis is done on the online system. The bias analysis has not yet been converted, and probably never will. The EXCEL bias analysis procedure is a bit clumsy, and the instructions reflect that...

1. Collect Bias data:

  • list by name the files in \\d0server4\projects\SciFi\Data\.
  • select all Bias_560*.txt files, and copy them to .\bias\new\.
  • sort bias\new by date.
  • in bias\new, keep only those files that changed since the last processing date; delete the old stuff.
  • open a command window in bias\new, and concatenate the files (copy *.txt allbias_<yyyymmdd>.txt).

2. Analyze the Bias data on NT (EXCEL spreadsheet):

  • open \\d0server4\projects\SciFi\database\allbias_new.xls.
  • in Excel, open the allbias_<yyyymmdd>.txt file that you just created in \\d0server4\projects\SciFi\Data\bias\new\ ;
    options: 'delimited' (i.e. not fixed width), 'space' (i.e. check the 'space' box).
  • Select all the data (i.e. all cells from column 'A' to column 'R', 48 rows per dataset). Do not select beyond column 'R'.
  • Copy the data, and paste them into cell 'A1' of the sheet 'allbias_data' in 'allbias_new.xls'.
  • the new workbook can now be deleted (closed without saving).
  • In 'allbias_new.xls\allbias_data', extend if necessary the analysis part of the sheet (column 'S' through 'AJ') by selecting an integer number of dataset analysis fields (48 rows each), and copying them to the first empty cell (S,n*48+1) (i.e. horizontally aligned with the '*********' marker).
  • the 'summary' sheet will have updated automatically;
    copy/'paste special' (value only) the continuous range of valid cells (cells that do have data) from the first two columns to the sheet 'allbias_<yyyymmdd>';
    also copy/'paste special' (value only) the calibration constants, 32 columns starting with 'AX' (i.e. 'AX' to 'CC').
  • in the 'allbias_yyyymmdd' sheet, make sure the 'dummy' column is extended to cover the new data range plus one extra line.
  • Enter '999999' as board id on the extra line; this is needed to force processing of the last board.
  • update the name of 'allbias_<yyyymmdd>' to properly reflect the current date.
  • copy (value only) the first six columns from 'summary' to the 'by date' sheet, cell 'C10'.
  • if necessary, extend the first (LHB/RHB) column by selecting and dragging the last value.
  • Select, including the header row, and resort 'by date'. (Data/sort usually remembers the last sort procedure for any given sheet; this sheet gets sorted by LH/RH descending, date descending, board ascending, with header row.)
  • save the calibration data sheet 'allbias_<yyyymmdd>' as a .csv file in \\d0server4\projects\SciFi\database\ ('save as...', select '.csv', 'ok' on 'save this sheet only').
  • when everything else is done, save 'allbias_new.xls'; this can take a while....

3. Transfer Bias results to the online cluster (e.g. d0ol24), and enter into DB:

  • ftp the new 'allbias_<yyyymmdd>.csv' file to your account on d0ol08.
  • as d0cft on the online cluster (e.g. d0ol24), copy the new 'allbias_<yyyymmdd>.csv' file from your area to the /home/d0cft/afe/bias area.
  • to update the bias constants in the database, run python bias_process.py allbias_<yyyymmdd>.csv > bias_<yyyymmdd>.log.
  • inspect bias_<yyyymmdd>.log (check that it didn't bomb, and that the number of boards processed looks reasonable).

4. Collect the Cryo data:

  • list by name the files in \\d0server4\projects\SciFi\Data.
  • select all Cryo_560*.txt files, and copy them to .\cryo\new\.
  • sort cryo\new by date.
  • open a command window in cryo\new, and ftp the new Cryo_560*.txt files only (the ones that have a newer version than in the cryo directory itself) to your account on d0ol08.
  • as d0cft on the online cluster (e.g. d0ol24), copy the new Cryo_560*.txt files from your area to the /home/d0cft/afe/cryo/ area.

5. Analyze the Cryo data and update the afe_properties DB table on the online cluster (e.g. d0ol24):

  • in d0cft/afe/cryo/, run python cryo_process.py   >   cryo_<yyyymmdd>.log .
  • inspect cryo_<yyyymmdd>.log (check that it didn't bomb).

6. Update \\d0server4\projects\triggerelectronics\AFE8_Production_Testing\AFEtestResults.xls

  • Clear the colour fill for the date column (except for the 'Date' header cell).
  • Update the Date (incl. colour fill), Bias and Cryo result columns (good/bad) in sheet 'Sheet1' for both left and right hand boards, and save. Use the properly sorted 'by date' table from the bias analysis to ensure that you indeed included the most recent Phase V data.
  • rename \\d0server4\projects\SciFi\database\dbapplet\data\AFEtestResults.csv to AFEtestResults_old.csv.
  • Save a properly stripped (only lines with AFE board info) .csv version of the table to \\d0server4\projects\SciFi\database\dbapplet\data\AFEtestResults.csv.
The steps above can be done ahead of board installation time, but beware of boards tested in the last minute before platform installation!

Once the platform configuration has changed:

7. Process the new installation map

A. long procedure:

  • save a .csv version of the slot assignment spreadsheet 'AFE Install.xls' in \\d0server4\projects\SciFi\database\ as 'cryoslot_afe_assignments_<yyyymmdd>.csv'.
  • rename \\d0server4\projects\SciFi\database\dbapplet\data\cryoslot.csv to cryoslot_old.csv, _old to _oldd etc..
  • save a second .csv version, stripped of all rows that do NOT contain cryoslot entries, to \\d0server4\projects\SciFi\database\dbapplet\data\cryoslot.csv.
  • transfer the cryoslot assignment table (the first of the two .csv files mentioned above) to the online cluster (e.g. d0ol24), and copy it into the /home/d0cft/afe/cryo/ area.
  • enter the cryoslot assignment table into the database:
    python install_process.py cryoslot_afe_assignments_<yyyymmdd>.csv > install_<yyyymmdd>.log
  • inspect install_<yyyymmdd>.log
B. abbreviated procedure

    make a fresh copy of the most recent installation map on the online system in /home/d0cft/afe/cryo/:
    cp cryoslot_afe_assignments_<olddate>.csv cryoslot_afe_assignments_<currentdate>.csv
  • edit this new copy, updating the board numbers in column 14; please be careful and make sure not to add or delete commata, split lines etc.!
  • enter the cryoslot assignment table into the database:
    python install_process.py cryoslot_afe_assignments_<yyyymmdd>.csv > install_<yyyymmdd>.log
  • inspect install_<yyyymmdd>.log

8. Update the EPICS database:

2003-4-10: Typically not needed anymore, unless spare slots get 'swapped in'. To update the EPICS database(s) on the embedded 1553 processors d0olctl55 and d0olctl58, follow the instructions in http://d0server1.fnal.gov/projects/scifi/database/new_board_instructions.txt ('EPICS DB updating' on the CFT home page). This includes restarting the cft_gui and running set2normal by the CFT shifter.

9. Compute new cryo setpoints:

  • in /home/d0cft/afe/cryo/,
    python t_sp_process.py > t_sp_<yyyymmdd>.log .
  • inspect t_sp_<yyyymmdd>.log for premature ending.

10. Update the Bias and Cryo setpoints:

  • restart the cft_gui.
  • In the cft_gui, enable each newly added or recalibrated board, then select 'update bias' in the per crate VRBCR menu.
  • Do a full download.
  • Turn temperature control off and on ('off' exists only in the VRBCR menu; 'on' can be found there and as a button in the top-level window).

11. Update the true bias and true temperature EPICS records:

Click the CFT GUI top-level 'Update EPICS' button.

12. Clean up the \new areas under \\d0server4\projects\SciFi\Data\bias and \cryo:

Move all files up one directory, to \cryo and \bias, replacing any old calibration file copies with the same name. (Important: the original data files always stay in \Data\!)

Whom to call:

module/system expert phone email
bias/cryo Stefan Grünendahl 8760 Stefan@fnal.gov
cft_gui Jadzia Warchol 8341 warchol@fnal.gov
AFE Install.xls Stefan Grünendahl 8760 Stefan@fnal.gov

 

 

Last modified May 12th, 2006, by SG.
Please send questions or comments to Stefan Grünendahl (Stefan@fnal.gov).