Skip to content

Commit

Permalink
update segmentation tools
Browse files Browse the repository at this point in the history
  • Loading branch information
mfroeling committed Jun 11, 2024
1 parent 497b6e3 commit 8ae1b5a
Show file tree
Hide file tree
Showing 6 changed files with 628 additions and 336 deletions.
10 changes: 10 additions & 0 deletions QMRITools/Kernel/GeneralTools.wl
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ MemoryUsage::usage =
"MemoryUsage[] gives a table of which definitions use up memory.
MemoryUsage[n] gives a table of which definitions use up memory, where n is the amout of definitions to show."

MBCount::usgae =
"MBCount[expr] gives the memory usage of the expression in MB."

ClearTemporaryVariables::usage =
"ClearTemporaryVariables[] Clear temporary variables."

Expand Down Expand Up @@ -1374,6 +1377,13 @@ MADNoZeroi = Compile[{{vec, _Real, 1}}, If[AllTrue[vec, # === 0. &], 0., MedianD
(*Memory functions*)


(* ::Subsubsection::Closed:: *)
(*MBCount*)


MBCount[exp_] := Round[UnitConvert[N@Quantity[ByteCount[exp], "Byte"], "Megabytes"], .1];


(* ::Subsubsection::Closed:: *)
(*MemoryUsage*)

Expand Down
Loading

0 comments on commit 8ae1b5a

Please sign in to comment.