Skip to content

Phase and delay calculations in DiscChopper.comp disagree #2347

@g5t

Description

@g5t

The position in angle-space of a disc chopper in time is, e.g.,
$$\theta(t) = \omega t + \phi$$
where $\omega$ is the angular frequency and $\phi$ is the position of the disc at $t=0$, also known as the phase.

Equivalently, one can write
$$\theta(t) = \omega\left(t + \delta\right)$$
where the timing offset $\delta$ could be known as the delay.

It is therefore clear that we can relate $\phi$ and $\delta$ by
$$\phi = \omega\delta$$
or
$$\delta = \phi / \omega$$

Contrary to these relationships, the DiscChopper.comp definition treats calculation of $\phi$ from $\delta$ differently than the inverse:

/* Calulate delay from phase and vice versa */
if (phase) {
if (delay) {
fprintf (stderr, "DiskChopper: %s WARNING: delay AND phase specified. Using phase setting\n", NAME_CURRENT_COMP);
}
phase *= DEG2RAD;
/* 'Delay' should always be a delay, taking rotation direction into account: */
delay = phase / fabs (omega);
} else {
phase = delay * omega; /* rad */
}

There are two closed issues related to the DiscChopper phase, neither of which seems to directly relate to this problem:

  1. DiskChopper, rotation seems to be left-handed with positive frequency #1128
  2. DiskChopper: Phase is not calculated correctly from delay it seems... #377

Possible relevant supporting information is available in scippneutron's documentation

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions