DiamondLightSource / Opt-ID

Code for the Optimisation of ID's using Python and Opt-AI
Apache License 2.0
7 stars 6 forks source link

Create a HDF5 field file for a template #2

Closed markbasham closed 10 years ago

markbasham commented 10 years ago

This should load a ID description and make a full set of lookup fields for it.

D1 -> Unique ID - n long D2 -> Field Component - 3 long (s, z, x) D3,4,5 -> Field strength (s, z, x)

markbasham commented 10 years ago

ok rethink,

number of magnets x 3x3 field components from calc_B X x Z x S positions to map ~ 10 x 7 x 2000 this will be a single array called (B)

process to evaluate the array will be build a 3 x n array of the magnet strengths with flip etc. considered ( A).

for each magnet pull out the appropriate part of B and multiply up A[n] * B[n,:,:,:,:,spos] where spos is the shimming height

This can possibly be done in a single calculation by spos being an appropriately sized array.

markbasham commented 10 years ago

Needs to have the direction taken into account to make this correct.

markbasham commented 10 years ago

This now looks correct, but it would be good to test it.