UNU-1OP(1)
π unu-1op β bestie edition β¨
okay so you know unu? this is the unary operation girlie of the family. she lives in the User Commands section of the manual, section 1, and she is so good at her one job. one nrrd in, one nrrd out, one operation applied to literally every value. no cap. π
β¨ NAME β¨
unu-1op β unary operation on a nrrd π¦
πΈ SYNOPSIS πΈ
unu 1op <operator> [-s,--seed <seed>] [-t,--type <type>] [-i,--input
<nin>] [-o,--output <nout>]
π DESCRIPTION π
Unary operation on a nrrd. that's it. that's the whole vibe. π
- Uses
nrrdArithUnaryOp(the actual math machinery behind the scenes, she's iconic)
π OPTIONS π
operatorβ the unary operator, bestie. Possibilities include:- β
-β: negative (multiply by-1.0) π - β
rβ: reciprocal (1.0/value) - β
sinβ, βcosβ, βtanβ, βasinβ, βacosβ, βatanβ: same as in C π§ - β
expβ, βlogβ, βlog10β: same as in C - β
log1pβ, βexpm1β: accuratelog(x+1)andexp(x)-1β¨ - β
log2β: log base 2 - β
sqrtβ, βcbrtβ, βceilβ, βfloorβ: same as in C πΈ - β
erfβ: error function (integral of Gaussian) π₯ - β
rupβ, βrdnβ: round up or down to integral value - β
absβ: absolute value π - β
sgnβ:-1,0,1if value is<0,==0, or>0 - β
existsβ:1iff not NaN or+/-Inf,0otherwise - β
randβ: random value in[0.0,1.0), no relation to input π - β
nrandβ: random sample from normal distribution with mean0.0and stdvi1.0, no relation to input π - β
ifβ: if input is non-zero,1, else0 - β
0β: output always0 - β
1β: output always1π
- β
-s <seed>,--seed <seed>β seed value for the RNG, forrandandnrand, so that you can get repeatable results between runs. or, by not using this option, the RNG seeding will be based on the current time (string). so like, chaos mode by default, deterministic mode if you ask nicely π-t <type>,--type <type>β convert input nrrd to this type prior to doing operation. useful when the desired output is float (e.g., withlog1p) but the input is integral. by default (not using this option), the types of the input nrrds are left unchanged. she's not gonna touch your types unless you tell her to, fr fr-i <nin>,--input <nin>β input nrrd π¦-o <nout>,--output <nout>β output nrrd (string); default: β-β π
π SEE ALSO π
unu(1) β¨
abs(3), acos(3), asin(3), atan(3), cbrt(3), ceil(3), cos(3), erf(3), exp(3), expm1(3), fabs(3), floor(3), isfinite(3), log(3), log10(3), log1p(3), log2(3), rand(3), sin(3), sqrt(3), tan(3) π§π
okay one (1) warning-ish thing bestie:randandnrandgenuinely do not care about your input at all. zero relation. if you want the same numbers twice, use-s/--seed. periodt. π
and that's the whole page, bestie!! this one's from the UNU-1OP(1) manual, August 2021 edition, and yeah she's still sitting in section 1 of User Commands where she belongs. mwah πππ¦β¨
π¦ where this page comes from
- fedora 43: teem 1.11.0-83.fc43 Β· LGPL-2.1-or-later WITH LicenseRef-Fedora-Temporary-Simple-Library-exception
- fedora 43: teem 1.11.0-86.fc43 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- fedora 44: teem 1.11.0-87.fc44 Β· LGPL-2.1-or-later WITH Simple-Library-Usage-exception
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms