Skip to content

Conversation

@T-Nicholls
Copy link
Collaborator

@T-Nicholls T-Nicholls commented Oct 4, 2018

Ready to merge

@coveralls
Copy link

coveralls commented Oct 4, 2018

Coverage Status

Coverage increased (+0.01%) to 99.493% when pulling 75689a8 on T-Nicholls:unitConvChanges into dbc01c8 on dls-controls:master.

@T-Nicholls
Copy link
Collaborator Author

Should we add a get_units(field) method or are we content with the get_unitconv(field).eng/phys_units syntax?

@T-Nicholls
Copy link
Collaborator Author

@willrogers I think this should be good to merge now.

sext_families = findmemberof('SEXT');

% Unit conversions for lattice fields
fprintf(f_units, '%d,%s,poly,%d,%s,%s\n', 0, 'energy', 0, 'Mev', 'Mev');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be MeV and GeV (GeV being whichever is the smaller number)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch I will correct the physics units to Gev.

end
id = write_linear_data(data.field(2) / data.current(2), 0);
fprintf(f_units, '%d,%s,poly,%d\n', renamedIndexes(hcor_index), 'x_kick', id);
fprintf(f_units, '%d,%s,poly,%d,%s,%s\n', renamedIndexes(hcor_index), 'x_kick', id, 'rads^-2', 'A');
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure where rads^-2 came from. The value is in radians, but for simplicity we are treating radians as dimensionless: https://en.wikipedia.org/wiki/Radian#Dimensional_analysis

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In that case, should it be 'rads', 'A' or '', 'A'?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'', 'A'

@willrogers willrogers merged commit 1965494 into DiamondLightSource:master Oct 31, 2018
@T-Nicholls T-Nicholls deleted the unitConvChanges branch October 31, 2018 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants