MIES icon indicating copy to clipboard operation
MIES copied to clipboard

Spring cleaning: Split MIES_Utilities.ipf into several files

Open t-b opened this issue 1 year ago • 1 comments

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.

t-b avatar Mar 07 '24 18:03 t-b

We should split up MIES_MIESUtilities.ipf as well.

t-b avatar May 06 '24 15:05 t-b

We have green light from Tim to tackle this after the current important and open PRs. Will be timeboxed to 1d.

t-b avatar Jun 11 '24 18:06 t-b

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 avatar Jul 12 '24 10:07 MichaelHuth

@MichaelHuth LGTM.

t-b avatar Jul 12 '24 11:07 t-b

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

MichaelHuth avatar Jul 12 '24 12:07 MichaelHuth

Split UTF_Utils.ipf in the same logic as MIES_Utilities.ipf Split UTF_Sweepformula.ipf to Operation tests and parser/other tests.

MichaelHuth avatar Jul 17 '24 15:07 MichaelHuth

@MichaelHuth Is there still something to do here?

t-b avatar Jul 23 '24 19:07 t-b

I think its good enough for now. Until next spring...

MichaelHuth avatar Jul 24 '24 10:07 MichaelHuth