Spring cleaning: Split MIES_Utilities.ipf into several files
This file has more than 330 functions and even seasoned developers don't find useful functions there.
The biggest task is to find a classification scheme for the functions which everyone intuitively grasps.
UTF_UTils.ipf should then also be split in the same fashion.
We should split up MIES_MIESUtilities.ipf as well.
We have green light from Tim to tackle this after the current important and open PRs. Will be timeboxed to 1d.
Association for MIES_Utilities.ipf:
| Checks | Conversions | File | DataFolder | List | WaveHandling | Algorithm | Debugger | Strings | GUI | System | Time | Numeric | ProgramFlow | JSON | Generators |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IsValidObjectName | ConvertFromBytesToMiB | UniqueFileOrFolder | GetListOfObjects | ListMatchesExpr | EnsureLargeEnoughWave | Downsample | DisableDebugger | ExtractStringFromPair | IsWaveDisplayedOnGraph | GetExperimentName | GetTimeStamp | NewRandomSeed | AssertOnAndClearRTError | AddPayloadEntriesFromFiles | GenerateMultiplierConstants |
| IsValidLiberalObjectName | ConvertSamplingIntervalToRate | IsDriveValid | GetAllObjects | ListFromList | EnsureSmallEnoughWave | CalculateLCM | ResetDebuggerState | PossiblyUnquoteName | KillCursorInGraphs | GetExperimentFileType | DateTimeInUTC | GetReproducibleRandom | ClearRTError | AddPayloadEntries | |
| NameChecker | ConvertRateToSamplingInterval | GetDrive | DataFolderExistsDFR | BuildList | GetWaveSizeImplementation | CalculateLCMOfWave | DisableDebugOnError | LineBreakingIntoPar | FindCursorInGraphs | GetFreeMemory | GetISO8601TimeStamp | GetUniqueInteger | IsFunctionCalledRecursively | ||
| IsStrictlyPositiveAndFinite | TextWaveToList | CreateFolderOnDisk | IsGlobalDataFolder | WaveListHasSameWaveNames | GetSizeOfType | GetUniqueEntries | ResetDebugOnError | RemovePrefix | GetCursorXPositionAB | IsBackgroundTaskRunning | ParseISO8601TimeStamp | SetBit | DoAbortNow | ||
| IsNullOrPositiveAndFinite | ListToTextWaveMD | GetBaseName | IsFreeDatafolder | AddPrefixToEachListItem | GetWaveSize | GetUniqueTextEntriesFromList | RemoveEndingRegExp | RemoveAnnotationsFromGraph | QuerySetIgorOption | ParseISO8601TimeStampToComponents | ClearBit | GetStackTrace | |||
| BetweenZeroAndOneExc | NumericWaveToList | GetFileSuffix | createDFWithAllParents | AddSuffixToEachListItem | GetLockState | GetUniqueTextEntries | SearchWordInString | UniqueTraceName | ForceRecompile | StopAllMSTimers | PopCount | MU_RunningInMainThread | |||
| BetweenZeroAndOne | ListToNumericWave | GetFolder | RemoveEmptyDataFolder | RemovePrefixFromListItem | GetNumberFromWaveNote | CallFunctionForEachListItem | SearchRegexInString | GetMarkerSkip | GetIgorExtensionFolderName | RelativeNowHighPrec | FindNextPower | ASSERT | |||
| BetweenZeroAndOneHoundredExc | ListHasOnlyOneUniqueEntry | GetFile | IsDataFolderEmpty | MergeLists | SetNumberInWaveNote | CallFunctionForEachListItem_TS | SearchStringBase | KillWindows | GetIgorExecutable | GetReferenceTime | FindPreviousPower | ASSERT_TS | |||
| BetweenZeroAndOneHoundred | str2numSafe | GetWindowsPath | RemoveAllEmptyDataFolders | GetStringFromWaveNote | GetRowIndex | CountSubstrings | GetAllAxesWithOrientation | GetArchitectureBits | GetElapsedTime | GetAlignment | |||||
| IsFinite | FloatWithMinSigDigits | GetHFSPath | UniqueDataFolder | SetStringInWaveNote | GetListDifference | ParseUnit | GetNumFromModifyStr | GetIgorInfo | StoreElapsedTime | RoundNumber | |||||
| IsNaN | ToPassFail | ResolveAlias | UniqueDataFolderName | AddEntryIntoWaveNoteAsList | InPlaceRandomShuffle | GetDecimalMultiplierValue | SortAxisList | GetIgorProVersion | GetDayOfWeek | GenerateRFC4122UUID | |||||
| IsInf | ToTrueFalse | GetUniqueSymbolicPath | RenameDataFolderToUniqueName | HasEntryInWaveNoteList | ExtractFromSubrange | ReplaceWordInString | GetPlotArea | GetIgorProBuildVersion | SymmetrizeRangeAroundZero | ||||||
| IsNull | ToOnOff | GetAllFilesRecursivelyFromPath | RefCounterDFIncrease | UniqueWaveName | GetSetUnion | ReplaceRegexInString | ParseColorSpec | GetSystemUserName | LimitWithReplace | ||||||
| IsEmpty | DAQRunModeToString | AskUserForExistingFolder | RefCounterDFDecrease | DuplicateSubRange | GetSetDifference | NormalizeToEOL | StoreCurrentPanelsResizeInfo | ControlWindowToFront | Base64EncodeSize | ||||||
| WindowExists | TestPulseRunModeToString | HasEnoughDiskspaceFree | DFREFClear | GetRowWithSameContent | GetSetIntersection | ElideText | GetNotebookCRC | ExecuteListOfFunctions | FindRightMostHighBit | ||||||
| ValueCanBeWritten | num2strHighPrec | GetOpenZFlag | GetColfromWavewithDimLabel | FindLevelWrapper | NumBytesInUTF8Character | FormatTextWaveForLegend | SleepHighPrecision | RoundAndDelta | |||||||
| IsInteger | ScaleToIndexWrapper | SaveTextFile | MakeWaveFree | GrepWave | UTF8CharactersInString | IsValidTraceLineStyle | GetMachineEpsilon | CeilAndDelta | |||||||
| IsEven | HexToNumber | LoadTextFile | SetDimensionLabels | GrepTextWave | UTF8CharacterAtPosition | IsValidTraceDisplayMode | CreateHistoryNotebook | FloorAndDelta | |||||||
| IsOdd | NumberToHex | LoadTextFileToWave | DeepCopyWaveRefWave | DistributeElements | UpperCaseFirstChar | UpdateInfoButtonHelp | GetHistoryNotebookText | IndexAfterDecimation | |||||||
| FuncRefIsAssigned | HexToBinary | FileExists | ReduceWaveDimensionality | CalculateNiceLength | GetASLREnabledState | MinMax | |||||||||
| CheckIfClose | ConvertListToRegexpWithAlternations | FolderExists | RemoveAllDimLabels | BinarySearchText | TurnOffASLR | ||||||||||
| CheckIfSmall | ConvertToUniqueNumber | GetFileVersion | WaveModCountWrapper | DoPowerSpectrum | IsWindows10 | ||||||||||
| IsTextWave | GetCodeForWaveContents | GetFileSize | MergeTwoWaves | DoFFT | UploadJSONPayload | ||||||||||
| IsNumericWave | WaveTypeStringToNumber | HFSPathToPosix | ChangeWaveLock | CompressNumericalList | GetIgorInstanceID | ||||||||||
| IsWaveRefWave | WaveToJSON | HFSPathToWindows | DeleteWavePoint | SplitLogDataBySize | CleanupOperationQueueResult | ||||||||||
| IsFloatingPointWave | JSONToWave | HFSPathToNative | RemoveTextWaveEntry1D | ||||||||||||
| IsDoubleFloatingPointWave | UTF8StringToTextWave | GetSymbolicPathForDiagnosticsDirectory | SplitTextWaveBySuffix | ||||||||||||
| IsSingleFloatingPointWave | ShowDiagnosticsDirectory | WaveRef | |||||||||||||
| IsGlobalWave | SanitizeFilename | WaveText | |||||||||||||
| IsComplexWave | LoadWaveFromDisk | SelectWave | |||||||||||||
| IsFreeWave | StoreWaveOnDisk | RemoveUnusedRows | |||||||||||||
| HasOneValidEntry | GetUserDocumentsFolderPath | DuplicateWaveToFree | |||||||||||||
| HasOneFiniteEntry | MU_GetFreeDiskSpace | ZapNaNs | |||||||||||||
| StringEndsWith | ChangeFreeWaveName | ||||||||||||||
| EqualValuesOrBothNaN | ZapNullRefs | ||||||||||||||
| IsConstant | SplitWavesToDimension | ||||||||||||||
| IsValidRegexp | FindFirstNaNIndex | ||||||||||||||
| AreIntervalsIntersecting | SetDimensionLabelsFromWaveContents | ||||||||||||||
| HasWildcardSyntax | |||||||||||||||
| MatchAgainstWildCardPatterns |
@MichaelHuth LGTM.
For MIES_MiesUtilitities.ipf: I made one column that refers to functions that should be moved to the regular utils.
| Checks | GUI | Logbook | Channels | Conversion | Sweep | Device | DataManagement | Getter | Config | System | Move to MIES_Utils.ipf | Algorithm | Stimset | BackupWaves | ZeroMQ | Settings | Uploads | Logs | Reconstruction |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IsValidEpochNumber | HorizExpandWithVisX | GetLogbookType | GetADCListFromConfig | ChannelTypeToString | GetSweepColumn | GetAllDevices | KillOrMoveToTrash | GetConfigWave | GetSamplingInterval | SaveExperimentSpecial | CleanupExperimentName | CalculateAverage | ExtractAnalysisFuncFromStimSet | RestoreFromBackupWavesForAll | GetZeroMQXOPFlags | GenerateSettingsDefaults | UploadCrashDumpsDaily | GetITCXOP2Logfile | RecreateMissingSweepAndConfigWaves |
| IsValidSweepAndConfig | GetSpecialControlLabel | GetLogbookWaves | GetDACListFromConfig | ParseChannelTypeFromString | GetSweepsWithSetting | GetAllDevicesWithContent | KillOrMoveToTrashPath | GetSweepWave | GetDataOffset | SaveExperimentWrapper | ConvertFreeWaveToPermanent | CalculateTPLikePropsFromSweep | GetStimSetType | CreateBackupWavesForAll | StartZeroMQSockets | UpgradeSettings | UploadLogFilesDaily | GetZeroMQXOPLogfile | RecreateSweepWaveFromBackupAndLBN |
| IsValidSamplingMultiplier | GetPanelControl | ExtractLogbookSliceTimeStamp | GetTTLListFromConfig | GetNumberFromType | GetLastSweepWithSetting | GetHardwareType | MoveToTrash | GetConfigWaveName | UpdateSweepConfig | SetupBackgroundTasks | MoveFreeWaveToPermanent | DecimateWithMethod | ExtractAnalysisFunctionParams | CreateBackupWave | UpdateXOPLoggingTemplate | ToggleUserPingSetting | UploadPingPeriodically | FilterByDate | RecreateConfigWaveFromLBN |
| LayoutGraph | ExtractLogbookSliceDeltaTime | GetNrOfTypedChannels | GetWaveBuilderParameterTypeName | GetLastSweepWithSettingIndep | ParseDeviceString | GetSweepWaveName | GetDefaultElectrodeName | NewExperiment | CalcHashForFile | FindIndizes | GetBackupWave | GetUserPingEnabled | GenerateJSONTemplateForUpload | ArchiveLogFilesOnceAndKeepMonth | |||||
| GetNextTraceIndex | ExtractLogbookSliceSweep | GetTTLTypesFromConfig | ConvertAmplifierModeShortStr | GetLastSweepWithSettingText | GetListOfUnlockedDevices | GetSetFolder | GetConfigWaveDims | TestOverrideActive | CheckIfPathsRefIdenticalFiles | ReplaceWaveWithBackupForAll | GetUserPingTimestamp | UploadCrashDumps | |||||||
| CreateTiledChannelGraph | ExtractLogbookSliceEmpty | GetADCTypesFromConfig | ConvertAmplifierModeToString | GetLastSweepWithSettingTextI | GetListOfLockedDevices | GetSetFolderAsString | IsValidConfigWave | HandleOutOfMemory | DuplicateWaveAndKeepTargetRef | ReplaceWaveWithBackup | SetUserPingTimestamp | UploadLogFiles | |||||||
| GetTraceNamePrefix | GetLastSettingIndep | GetDACTypesFromConfig | GetAbbreviationForAnalysisFunction | GetDAQDataSingleColumnWaves | GetListOfLockedITC1600Devices | GetSetParamFolder | GetFirstADCChannelIndex | GetWorkLoadName | SearchForDuplicates | ||||||||||
| TiledGraphAccelerateDraw | GetLastSettingTextIndep | GetTypeListFromITCConfig | MapAnaFuncToConstant | GetDAQDataSingleColumnWaveNG | CloseNWBFile | GetSetParamFolderAsString | GetProgramFilesFolder | ||||||||||||
| GetHeadstageColor | GetLastSettingIndepRAC | GotTPChannelsOnADCs | GetDAQDataSingleColumnWave | IsITC1600 | GetNIFIFOName | MoveWaveWithOverwrite | |||||||||||||
| EquallySpaceAxis | GetLastSettingIndepSCI | GetTTLBits | ExtractOneDimDataFromSweep | IsDeviceNameFromSutter | GetMIESVersionAsString | ZeroWave | |||||||||||||
| EquallySpaceAxisPA | GetLastSettingTextIndepSCI | GetUsedHWDACFromLNB | ExtractSweepNumber | IsDeviceActiveWithBGTask | GetAnalysisFunctionVersion | ZeroWaveImpl | |||||||||||||
| PostPlotTransformations | GetLastSettingTextIndepRAC | GetActiveChannels | CopySweepToWRef | GetNextRandomNumberForDevice | GetSweepAndConfigWaveFromDevice | GetDecimatedWaveSize | |||||||||||||
| TimeAlignMainWindow | GetLastSettingChannel | SplitAndUpgradeSweep | GetTotalOnsetDelayFromDevice | ConvertXOPErrorCode | |||||||||||||||
| TimeAlignGetAllTraces | GetLastSetting | ResolveSweepChannel | GetLastNonEmptyEntry | ||||||||||||||||
| TimeAlignHandleCursorDisplay | GetLastSettingNoCache | SplitTextSweepElement | AlreadyCalledOnce | ||||||||||||||||
| TimeAlignUpdateControls | GetLastSettingTextRAC | GetSweepComponentWaveName | |||||||||||||||||
| TimeAlignCursorMovedHook | GetLastSettingRAC | UpdateLeftOverSweepTime | |||||||||||||||||
| GetAllSweepTraces | GetLastSettingIndepEachRAC | LeftOverSweepTime | |||||||||||||||||
| GetSweepUserData | GetLastSettingTextIndepEachRAC | IsValidSweepWave | |||||||||||||||||
| TimeAlignmentIfReq | GetLastSettingEachRAC | IsValidSweepNumber | |||||||||||||||||
| EqualizeVerticalAxesRanges | GetLastSettingTextEachRAC | GetTotalOnsetDelay | |||||||||||||||||
| GetAllDAEphysSetVarNum | GetLastSettingTextSCI | SplitAndUpgradeSweepGlobal | |||||||||||||||||
| GetAllDAEphysSetVarTxT | GetLastSettingSCI | TextSweepToWaveRef | |||||||||||||||||
| GetAllDAEphysPopMenuIndex | GetLastSettingIndepEachSCI | ||||||||||||||||||
| GetAllDAEphysPopMenuString | GetLastSettingTextIndepEachSCI | ||||||||||||||||||
| RemoveFreeAxisFromGraph | GetLastSettingEachSCI | ||||||||||||||||||
| RemoveDrawLayers | GetLastSettingTextEachSCI | ||||||||||||||||||
| RemoveTracesFromGraph | GetNonEmptyLBNRows | ||||||||||||||||||
| AddVersionToPanel | GetIndexForHeadstageIndepData | ||||||||||||||||||
| HasPanelLatestVersion | CreateLBNUnassocKey | ||||||||||||||||||
| GetPanelVersion | CreateTTLChannelLBNKey | ||||||||||||||||||
| UpdateSweepPlot | IsUnassocLBNKey | ||||||||||||||||||
| UpdateSettingsPanel | RemoveUnassocLBNKeySuffix | ||||||||||||||||||
| GetPlainSweepList | EntrySourceTypeMapper | ||||||||||||||||||
| ToggleCheckBoxes | ReverseEntrySourceTypeMapper | ||||||||||||||||||
| EqualizeCheckBoxes | CreateAnaFuncLBNKey | ||||||||||||||||||
| GetTraceInfos | SetAnalysisFunctionVersion | ||||||||||||||||||
| RemoveSweepFromGraph | GetHeadstageForChannel | ||||||||||||||||||
| AddSweepToGraph | |||||||||||||||||||
| UpdateSweepInGraph | |||||||||||||||||||
| StoreWindowCoordinatesHook |
Split UTF_Utils.ipf in the same logic as MIES_Utilities.ipf Split UTF_Sweepformula.ipf to Operation tests and parser/other tests.
@MichaelHuth Is there still something to do here?
I think its good enough for now. Until next spring...