Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changes to fields and description of NXdisk_chopper #649

Merged
merged 13 commits into from
May 29, 2019

Conversation

matthew-d-jones
Copy link
Member

@matthew-d-jones matthew-d-jones commented Mar 19, 2019

Since the existing NXdisk_chopper definitions appeared not to be fit for purpose I have been bold in making breaking changes. edit: changes are now non-breaking

Changes follow discussion of requirements for recording chopper data at the ESS.

I think the delay description requires further refinement.

@matthew-d-jones
Copy link
Member Author

@zjttoefs I've created this as a draft PR for you to take a look at first. The phase description still makes little sense to me.

@zjttoefs
Copy link
Contributor

Is there a need to make the changes breaking?

I don't think we need to remove anything. And the phase in time might better be called delay. No?

@matthew-d-jones
Copy link
Member Author

The other breaking changes were removing the type and wavelength_range fields which don't make sense for a single disk, and changing the meaning of the radius field which made little sense to me.

@matthew-d-jones
Copy link
Member Author

Just realised I carefully used American spelling everywhere to be consistent with "disk" in "NXdisk_chopper" but then used the term "anticlockwise".

@prjemian
Copy link
Contributor

Re wavelength_range, isn't there always a range of wavelengths that depends on the chopper opening size and the rotation speed?

@matthew-d-jones
Copy link
Member Author

Re wavelength_range, isn't there always a range of wavelengths that depends on the chopper opening size and the rotation speed?

I suppose there is technically a low bound on the energy due to the thickness of the disk, but otherwise not really with a single disk.

Copy link
Contributor

@zjttoefs zjttoefs left a comment

Choose a reason for hiding this comment

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

I don't like the breaking changes being mixed in with the very valid additions and improvements proposed. (That includes the repurposing of slit_angle and phase.)

This can be easily done in two separate stages.

@mkoennecke
Copy link
Contributor

There is a contradiction here: in the top documentation it says that there ought to be a NXdisk_chopper group per disk. Then the pair_separation does not make any sense as it implies a chopper pair.

Regarding the phase. Given there is a distance between two choppers. Then the second chopper has to open a little later then the first one in order to account for the flight time between the two choppers. This is expressed as an angular offset, the phase, in the chopper systems I had to deal with so far. This is something we read from the chopper controller, thus I want to have this field in order to record it. I do not mind the additional fields, they serve to describe the chopper in a more accurate way.

@matthew-d-jones
Copy link
Member Author

matthew-d-jones commented Apr 3, 2019

@mkoennecke
There is already an angular phase field.

I originally removed the fields which don't make sense for a single disk, but Tobias is keen not to make breaking changes at the same time as the additions.
Given that there is nowhere else to store potentially useful information like wavelength_range and pair_separation, perhaps it is not unreasonable to store them in one, or both, of the two separate NXdisk_choppers making up the pair? Similarly, specifying type of "synchro_pair" could imply that this disk is one of those in the pair. We would need to change the wording to make this clear.

Copy link
Contributor

@zjttoefs zjttoefs left a comment

Choose a reason for hiding this comment

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

I'm happy with this now.
@mkoennecke 's comments are also addressed, I would say: angular phase always existed and while the pair separation does contradict the premise of the base class, that is legacy and should be addresses separately.

@matthew-d-jones matthew-d-jones marked this pull request as ready for review April 4, 2019 07:28
@prjemian
Copy link
Contributor

Ready to merge?

@zjttoefs
Copy link
Contributor

I have given my approval. If no one else comments with requests for changes in the next days, I would merge.

@prjemian
Copy link
Contributor

Ok, then. If no additional comments by May 22, then I will merge this.

@mkoennecke
Copy link
Contributor

I am mostly OK with this. But I have a minor point: There is this slits field which indicates that a chopper may have more than one slit (They usually do). Should then slit_angle and slit_edges not be arrays of length nSlits? This might apply to the radius etc. fields too.

@matthew-d-jones
Copy link
Member Author

matthew-d-jones commented May 21, 2019

I am mostly OK with this. But I have a minor point: There is this slits field which indicates that a chopper may have more than one slit (They usually do). Should then slit_angle and slit_edges not be arrays of length nSlits? This might apply to the radius etc. fields too.

slit_edges is already described as an array of length 2*nSlits:
https://github.com/nexusformat/definitions/pull/649/files#diff-965d206bd4d315d80b5f08de5a97d475R79

but I forgot to add the array description for slit_angle and slit_height, thanks for catching that.

Copy link
Contributor

@mkoennecke mkoennecke left a comment

Choose a reason for hiding this comment

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

I am happy now.

@prjemian prjemian added this to the NXDL 2019.10 milestone May 21, 2019
Copy link
Contributor

@prjemian prjemian left a comment

Choose a reason for hiding this comment

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

Ok by me

@zjttoefs zjttoefs self-requested a review May 21, 2019 14:40
@zjttoefs
Copy link
Contributor

I don't like the new change. It changes existing fields and hence breaks existing files.

The height is rarely different for different cut outs, I believe. And changing the slit angle to an array makes the slit_edges redundant.

@prjemian prjemian self-requested a review May 22, 2019 18:11
@prjemian
Copy link
Contributor

Seems this is not yet ready to merge.

@zjttoefs
Copy link
Contributor

Since @mkoennecke framed his suggestions yesterday as "minor comments" I would think we're okay to merge after reverting the last commit and addressing the documentation improvement that @prjemian has highlighted.

Copy link
Contributor

@zjttoefs zjttoefs left a comment

Choose a reason for hiding this comment

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

Two small changes and I'm happy (again ;-).

<doc>chopper rotation speed</doc>
<doc>
Chopper rotation speed. Positive for anticlockwise rotation when
facing the sample, negative otherwise.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would make this "facing away from the source". Removes confusion if you ever put a chopper after the sample.

Copy link
Member Author

Choose a reason for hiding this comment

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

👍 done

base_classes/NXdisk_chopper.nxdl.xml Show resolved Hide resolved
@zjttoefs
Copy link
Contributor

Since we have three green ticks from reviewers, I would almost feel comfortable to merge. Especially since there are no changes (let alone breaking ones) to existing definitions.
But I'll give it a day or so, if @prjemian or @mkoennecke want to reassess the PR.

</field>
<field name="slits" type="NX_INT">
<doc>Number of slits</doc>
</field>
<field name="slit_angle" type="NX_FLOAT" units="NX_ANGLE">
<doc>angular opening</doc>
<doc>
Angle of the each edge of each slit from the position of the
Copy link
Contributor

Choose a reason for hiding this comment

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

change the each to each and I'm good overall

Copy link
Contributor

Choose a reason for hiding this comment

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

To cut this short, while I can't edit @matthew-d-jones source for the PR, I'll merge and drop the "the" in master.

@zjttoefs zjttoefs merged commit f3271c0 into nexusformat:master May 29, 2019
@zjttoefs
Copy link
Contributor

Brilliantly referenced the wrong pull request, but the deed is done in 935afe4

@matthew-d-jones matthew-d-jones deleted the Changes_to_NXdisk_chopper branch May 29, 2019 09:10
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.

4 participants