Project

General

Profile

SDDS to OPTIM converter

sdds2optim is a translation of M. McAteer's program toOptimFormat.nb into C++.

The sdds2optim converter reads in the MagnetSettings.txt file and machine_params_vs_t.sdds file to create

  • PseudoQuadErrors.opi
  • boosterCorrectors.opi

files

These two files are necessary for the analysis of the measured lattice with OPTIM using BoosterModel.opt lattice file.

The source code can be downloaded here:

git clone http://cdcvs.fnal.gov/projects/booster_sdds2optim

The use of OPTIM for calculating the required magnet changes to reduce beta beatings is a temporary one. Future LOCO implements will not require OPTIM.

Requirements

Builds on MacOSX 10.8.x and LINUX on CLX cluster are supported

The requirements are much less than fitit
but since sdds2couple is useless without fitit, the lesser requirements are not stated here.

Building

Edit the Makefile to put in the appropriate paths if necessary. The Makefile has been set up so that it knows whether it is run on a Mac or on the CLX cluster.

Run

 make

sdds2optim should be created. Move sdds2optim to your local path.

A pre-built version of sdds2optim for MacOSX or CLX LINUX can be requested from the author:

Running

sdds2optim assumes that the same file directory structure as fitit. The file options can be changed in .loco

Checking the configuration

sdds2optim -h

The output should look something like this

sdds2optim version 1.0-1-g9f85011-2
config file: /Users/cytan/.loco
command line options and their DEFAULT values
         gnuplot font  = /Library/Fonts/Arial.ttf
         plots dir = ./plots
         common dir = ./common
         results dir = ./results
         magnet settings = MagnetSettings.txt
         machine params vs t = machine_params_vs_t.sdds

generic options :
  -h [ --help ]                         this message
  -c [ --config ] arg (=/Users/cytan/.loco)
                                        LOCO configuration file
  -d [ --debug ]                        enable debugging
  -v [ --version ]                      print version

config file options:
  --fitit.gnufont arg                   gnuplot font
  --fitit.plots_dir arg (=./plots)      plot directory
  --fitit.common_dir arg (=./common)    common directory
  --fitit.results_dir arg (=./results)  results directory
  --fitit.magnet_settings arg (=MagnetSettings.txt)
                                        magnet settings up the ramp file
  --fitit.machine_params_vs_t arg (=machine_params_vs_t.sdds)
                                        machine params vs t results file

Debugging turns on plotting of *all* magnet ramps. Warning: SLOW!

Creating boosterCorrectors.opi and PseudoQuadErrors.opi files and plots

The requirements are that you have the following files:

  • machine_params_vs_t.sdds that was generated by fitit in the results directory.
  • MagnetSettings.txt the Booster ramp file in the common directory.

sdds2optim can be run with plots:

sdds2optim -d

WARNING! Running with the -d option slows everything down because all the magnets ramps are plotted

The files that are generated are:

  • boosterCorrectors.opi and PseudoQuadErrors.opi are in the results directory.
  • *.png files of the magnet ramps are in the plots directory.