5.8 KiB
source_files, generated_at, model, schema_version, sha256
| source_files | generated_at | model | schema_version | sha256 | |
|---|---|---|---|---|---|
|
2026-04-16T13:39:22.438752+00:00 | zai-org/GLM-5-FP8 | 1 | b9213b8d6a0e210e |
Documentation: PSDReportSettingsModel
1. Purpose
PSDReportSettingsModel is a data model class that encapsulates configuration settings for Power Spectral Density (PSD) report generation. It stores filter parameters (low-pass and high-pass), windowing configuration, and data range settings. The class implements INotifyPropertyChanged via BasePropertyChanged to support MVVM data binding and notifies a parent view model of changes through the IPSDReportSettingsModel interface.
2. Public Interface
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
Parent |
IPSDReportSettingsViewModel |
null |
Reference to the parent view model. Setter includes equality check to avoid redundant assignments. |
CanPublishChanges |
bool |
true |
Controls whether property changes trigger Parent.PublishChanges() notification. |
LowPassFilterEnabled |
bool |
false |
Enables/disables low-pass filter. Setting this sets ReadData = true. |
LowPassFilterFrequency |
double |
2000 |
Low-pass filter cutoff frequency in Hz. |
LowPassFilterType |
PassFilterType |
PassFilterType.Butterworth |
Type of low-pass filter algorithm. |
LowPassFilterOrder |
int |
8 |
Order of the low-pass filter. |
HighPassFilterEnabled |
bool |
false |
Enables/disables high-pass filter. |
HighPassFilterFrequency |
double |
5 |
High-pass filter cutoff frequency in Hz. |
HighPassFilterType |
PassFilterType |
PassFilterType.Butterworth |
Type of high-pass filter algorithm. |
HighPassFilterOrder |
int |
8 |
Order of the high-pass filter. |
WindowWidth |
WindowWidth |
WindowWidth.FortyNinetySix |
Width of the analysis window. |
WindowType |
WindowType |
WindowType.Hanning |
Window function type for spectral analysis. |
WindowAveragingType |
WindowAveragingType |
WindowAveragingType.Averaging |
Averaging method for window processing. |
WindowOverlappingPercent |
double |
50 |
Percentage of overlap between consecutive windows. |
ShowEnvelope |
bool |
false |
Controls whether envelope is displayed. |
IsSaved |
bool |
(unclear) | Read-only property. Initialization/setter not visible in source. |
ReadData |
bool |
false |
Flag indicating data should be re-read. |
DataStart |
double |
0D |
Start position for data range. |
DataEnd |
double |
0D |
End position for data range. |
Methods
| Method | Signature | Description |
|---|---|---|
OnPropertyChanged |
override void OnPropertyChanged(string propertyName) |
Raises PropertyChanged event and conditionally calls Parent.PublishChanges() unless the property is CanPublishChanges, Parent, or ReadData. |
Events
| Event | Type | Description |
|---|---|---|
PropertyChanged |
PropertyChangedEventHandler |
Override of base event; raised when any property value changes. |
3. Invariants
-
Change Notification Behavior: All property changes except
CanPublishChanges,Parent, andReadDatawill callParent?.PublishChanges()ifCanPublishChangesistrue. -
ReadData Side Effect: Setting any of the following properties automatically sets
ReadData = truebefore the property value is updated:LowPassFilterEnabled,LowPassFilterFrequency,LowPassFilterType,LowPassFilterOrderHighPassFilterEnabled,HighPassFilterFrequency,HighPassFilterType,HighPassFilterOrderWindowWidth,WindowType,WindowAveragingType,WindowOverlappingPercent,ShowEnvelopeDataStart,DataEnd
-
Parent Assignment Guard: The
Parentsetter will not raiseOnPropertyChangedif_parent != null && _parent.Equals(value)is true. -
CanPublishChanges Default: Initialized to
true, meaning change notifications are published by default.
4. Dependencies
This Module Depends On
DTS.Common.Enums.Viewer.Reports— ProvidesPassFilterType,WindowWidth,WindowType,WindowAveragingTypeenumsDTS.Common.Interface— ProvidesIPSDReportSettingsModelandIPSDReportSettingsViewModelinterfacesCommon.Base.BasePropertyChanged— Base class providingSetPropertymethod andINotifyPropertyChangedinfrastructure (namespace not fully qualified in source)
Consumers
- Any module referencing
IPSDReportSettingsModel(exact consumers not determinable from this source alone)
5. Gotchas
-
IsSaved Property Has No Visible Setter: The
IsSavedproperty has only a getter defined with no backing field or initializer visible. Its value source is unclear from this source alone—it may be computed elsewhere or require partial class definition. -
Parent Setter Equality Logic: The condition
if (_parent != null && _parent.Equals(value))means:- If
_parentisnull, the assignment proceeds even ifvalueis alsonull - This differs from typical null-coalescing patterns and may result in redundant
OnPropertyChangedcalls when settingParenttonullmultiple times
- If
-
ReadData Set Before SetProperty: For filter and window properties,
ReadData = trueis set before callingSetProperty. This meansReadDatawill betrueby the timeOnPropertyChangedfires for the original property, which could affect any listeners checkingReadDataduring change notification. -
CanPublishChanges Does Not Set ReadData: Unlike other boolean flags like
LowPassFilterEnabled, settingCanPublishChangesdoes not setReadData = true. This is intentional but inconsistent with other property behaviors.