Class SetupAngleReport
- Namespace
- Hi.MillingForces.Training
- Assembly
- HiNc.dll
One tool's entry of the setup-angle report file that
LocalProjectService.EstimateSetupAngle writes to its
dstRelFile: the SetupAngleEstimate flattened for
transport, plus the inputs of the call that made it. The file is a JSON
array of these, one per estimated tool, in the estimates' order;
ToJson(IEnumerable<SetupAngleReport>) and FromJson(string) are its two ends.
A public named type on purpose, never an anonymous one: the shipped
assembly is obfuscated with only its public API kept, and an anonymous
type there is renamed and loses its constructor parameter names, on
which System.Text.Json throws NotSupportedException before
a byte is written (the rule of IToPresentDto).
The property names are the JSON keys verbatim. NaN is a value here (a
failed or degenerate estimate) and is written as the literal NaN.
public sealed record SetupAngleReport : IEquatable<SetupAngleReport>
- Inheritance
-
SetupAngleReport
- Implements
- Inherited Members
- Extension Methods
Properties
AlternativeAngle_deg
With ScaleFixed: the other angle (deg) the fit allows, mirrored about the line the model moment swings along; NaN when the objective holds a single minimum, and otherwise.
public double AlternativeAngle_deg { get; init; }
Property Value
AlternativeObjectiveRatio
With ScaleFixed: the objective at AlternativeAngle_deg over that at Angle_deg (1 or more; near 1 the data cannot choose); NaN otherwise.
public double AlternativeObjectiveRatio { get; init; }
Property Value
Angle_deg
Estimated rotation (deg) folded into [0, Period_deg); positive =
the Mx→My sense of the spindle-rotation frame.
public double Angle_deg { get; init; }
Property Value
ChannelToModelRatio
With ScaleFixed: the channel's amplitude over the model moment's along its line at the pinned scale (ScaleRatio, 1 when NaN), |cos(φ+α)| when that scale is right; at 1 or more no angle makes the magnitudes agree. NaN otherwise.
public double ChannelToModelRatio { get; init; }
Property Value
Contrast
Contrast of the objective over the angle grid; near 0 means the cut does not constrain the angle.
public double Contrast { get; init; }
Property Value
CorrelationR
Pearson correlation R between the measured Mx/My samples and the rotated, scaled model.
public double CorrelationR { get; init; }
Property Value
Curve
Grid samples of the objective over the angle.
public IReadOnlyList<SetupAngleReportCurvePoint> Curve { get; init; }
Property Value
FixedScaleAngle_deg
The angle (deg) re-estimated with the scale pinned to 1 (free-scale fits); with ScaleFixed the angle itself, at the pinned scale.
public double FixedScaleAngle_deg { get; init; }
Property Value
FluteNum
Flute count of the cutter the samples came from.
public int FluteNum { get; init; }
Property Value
JsonOptions
The serializer options of the report file: indented; NaN and the infinities as named literals, since a failed or degenerate estimate is NaN and the default options refuse it.
public static JsonSerializerOptions JsonOptions { get; }
Property Value
KnownPara
Name of the known cutting parameter the model was built from.
public string KnownPara { get; init; }
Property Value
LowSignalChannel
The channel the low-signal warning named; null when none.
public string LowSignalChannel { get; init; }
Property Value
MagnitudeSensitivity_deg
With ScaleFixed: degrees the angle moves for each 1 % of error in the pinned scale (assumed 1: the coefficients' magnitude, the observation height, the holder calibration and the sampled pulses; measured from Mz: the observation height and effective radius, the torque-to-bending ratio of the coefficients and of the holder's calibrations, and the sampled pulses once more, by less – the torque's zero read from the gaps between the flutes keeps its undistorted mean in the ratio, so its loss nearly matches the bending's; a cut without a gap wide enough takes the slope with an intercept, which keeps the torque's harmonics alone, and they lose more to the sampling than the bending's fundamental); NaN otherwise.
public double MagnitudeSensitivity_deg { get; init; }
Property Value
MeanModelRipple
Energy-weighted mean of the used steps' model ripple (0..1): how strongly the cut modulates the transverse moment within a turn, the model-side identifiability measure.
public double MeanModelRipple { get; init; }
Property Value
MirrorAngle_deg
Best angle (deg) under the mirrored-frame hypothesis.
public double MirrorAngle_deg { get; init; }
Property Value
MirrorObjectiveRatio
Objective of the mirrored hypothesis over the plain one (< 1 favours the mirror).
public double MirrorObjectiveRatio { get; init; }
Property Value
MirrorPreferred
True when the mirrored measurement frame (My negated) fits markedly better than the plain rotation.
public bool MirrorPreferred { get; init; }
Property Value
ModelIsotropy
1 − |Σw·Q|/Σw·B of the used steps: 1 = the model moment covers every direction over a turn, 0 = it runs along one line.
public double ModelIsotropy { get; init; }
Property Value
Note
Human-readable summary.
public string Note { get; init; }
Property Value
Objective
Objective value at the estimate (residual energy of the used steps).
public double Objective { get; init; }
Property Value
OutlierRatio
Fraction of the worst-fitting steps trimmed before the final estimate.
public double OutlierRatio { get; init; }
Property Value
Period_deg
Ambiguity period of the estimate (deg): the flute pitch of a uniform fluting, 360 otherwise.
public double Period_deg { get; init; }
Property Value
SampleFlags
The channels the estimate was read on (SampleFlag, as text): the ones the call asked for, or, when it named none, the moment channels the tool declares its holder has.
public string SampleFlags { get; init; }
Property Value
ScaleFixed
True when the angle was fit with the scale pinned (one transverse channel on a one- or two-flute cutter: to 1 as assumed, or to the ratio the torque measures when a selected Mz gave a usable one, ScaleRatio); such an estimate comes with AlternativeAngle_deg when two angles fit and is then never applied automatically; a unique angle passes to the other gates.
public bool ScaleFixed { get; init; }
Property Value
ScaleRatio
Measured-over-model magnitude ratio of the fit; with ScaleFixed the ratio the torque measured when a selected Mz gave a usable one (the pinned scale: each step's torque set to the zero its bridge reads in the gaps between the flutes and the ratio taken through the origin, or the slope with an intercept where a step has too few gap samples – the Note says which and prints the zero), NaN when the scale was assumed 1 (Mz not selected, or not usable: SetupAngle-Scale–MzNotUsable).
public double ScaleRatio { get; init; }
Property Value
Scatter_deg
Energy-weighted circular standard deviation (deg) of the per-step angles around the estimate.
public double Scatter_deg { get; init; }
Property Value
SetupAngleSign
The sign convention the angle is applied with
(RotationSignConvention): the rotation
added to the tool's setup angle is SetupAngleSign × Angle_deg.
public int SetupAngleSign { get; init; }
Property Value
StepNum
Steps that carried Mx/My samples.
public int StepNum { get; init; }
Property Value
Steps
Per-step diagnostics.
public IReadOnlyList<SetupAngleStepEstimate> Steps { get; init; }
Property Value
Succeeded
False when no estimate could be formed; Note says why.
public bool Succeeded { get; init; }
Property Value
ToolId
Tool id of the cutter the samples came from; -1 when unknown.
public int ToolId { get; init; }
Property Value
TransverseChannels
The transverse channels the angle was fit on (SampleFlag, as text: Mx, My or both).
public string TransverseChannels { get; init; }
Property Value
TransverseEnergyRatio
Synchronous energy of the folded My over that of Mx; NaN with one channel.
public double TransverseEnergyRatio { get; init; }
Property Value
UsedStepNum
Steps that survived the signal and outlier gates.
public int UsedStepNum { get; init; }
Property Value
Methods
From(SetupAngleEstimate, string, SampleFlag, double)
Flattens one estimate together with the inputs of the call that made it.
public static SetupAngleReport From(SetupAngleEstimate estimate, string knownParaName, SampleFlag sampleFlags, double outlierRatio)
Parameters
estimateSetupAngleEstimateThe estimate.
knownParaNamestringName of the known cutting parameter the model was built from.
sampleFlagsSampleFlagThe channels the call asked for; Virtual (none named) is written as the channels the estimate was read on, the tool's declared ones.
outlierRatiodoubleThe call's outlier ratio.
Returns
- SetupAngleReport
The entry.
FromJson(string)
Reads a report file's text back.
public static List<SetupAngleReport> FromJson(string json)
Parameters
jsonstringThe JSON text.
Returns
- List<SetupAngleReport>
The entries, in the file's order.
ToJson(IEnumerable<SetupAngleReport>)
The report file's text: a JSON array of the entries, in order.
public static string ToJson(IEnumerable<SetupAngleReport> reports)
Parameters
reportsIEnumerable<SetupAngleReport>The entries; null writes an empty array.
Returns
- string
The JSON text.