summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2020-03-23 18:47:23 +0100
committerlassulus <lassulus@lassul.us>2020-03-23 18:47:23 +0100
commit119b56956c8bcb992c86ca8d0e854884e7c44695 (patch)
tree443b49414aabab470a790f6d16485bf50d78efbe /krebs/5pkgs
parente2ef8aba938fb39f826014de919471c7ce751d83 (diff)
nomads-cloud: double sqrt for better clouds
Diffstat (limited to 'krebs/5pkgs')
-rw-r--r--krebs/5pkgs/simple/nomads-cloud/default.nix4
1 files changed, 2 insertions, 2 deletions
diff --git a/krebs/5pkgs/simple/nomads-cloud/default.nix b/krebs/5pkgs/simple/nomads-cloud/default.nix
index 2af74dc44..9c39de891 100644
--- a/krebs/5pkgs/simple/nomads-cloud/default.nix
+++ b/krebs/5pkgs/simple/nomads-cloud/default.nix
@@ -22,7 +22,7 @@ writers.writeDashBin "nomads-cloud" ''
height=$(${jq}/bin/jq '.[0].header.ny' < "$json_path")
# The maximum gray value. Must be bigger than 0 and less than 65536.
- maxval=256
+ maxval=1000
# pgm - Netpbm grayscale image format
# http://netpbm.sourceforge.net/doc/pgm.html
@@ -32,7 +32,7 @@ writers.writeDashBin "nomads-cloud" ''
echo "$maxval"
cat "$json_path" |
${jq}/bin/jq --argjson maxval "$maxval" -c '
- .[0].data[] * $maxval | round
+ ((.[0].data[] | sqrt | sqrt) * $maxval | round)
' |
${findutils}/bin/xargs -n "$width"
} > "$pgm_path"