mirror of
https://github.com/netbymatt/nexrad-level-2-plot.git
synced 2026-11-28 10:28:04 -08:00
generate all elevations for test
This commit is contained in:
1 parent
7652e9fb81
commit
bf53273aa3
1 file changed
+14
-14
+14
-14
@@ -1,4 +1,5 @@
|
||||
const { Level2Radar } = require('nexrad-level-2-data');
|
||||
// eslint-disable-next-line import/no-extraneous-dependencies
|
||||
const glob = require('glob');
|
||||
const fs = require('fs');
|
||||
|
||||
@@ -30,20 +31,19 @@ const plots = [];
|
||||
// plot for each elevation and size
|
||||
(async () => {
|
||||
await Promise.allSettled([3600, 1800, 900, 800, 600, 450, 100].map(async (size) => {
|
||||
// await Promise.allSettled(radarData.listElevations().map(async (elevation) => {\
|
||||
const elevation = radarData.listElevations()[0];
|
||||
plots[elevation] = plot(radarData, ['REF', 'VEL'], {
|
||||
elevation,
|
||||
size,
|
||||
palettize: true,
|
||||
cropTo: size / 2,
|
||||
});
|
||||
await Promise.allSettled(radarData.listElevations().map(async (elevation) => {
|
||||
plots[elevation] = plot(radarData, ['REF', 'VEL'], {
|
||||
elevation,
|
||||
size,
|
||||
palettize: true,
|
||||
cropTo: size / 2,
|
||||
});
|
||||
|
||||
// write files to disk
|
||||
await Promise.allSettled([
|
||||
writePngToFile(`./output/REF-${elevation}-${size}.png`, plots[elevation].REF),
|
||||
writePngToFile(`./output/VEL-${elevation}-${size}.png`, plots[elevation].VEL),
|
||||
]);
|
||||
// }));
|
||||
// write files to disk
|
||||
await Promise.allSettled([
|
||||
writePngToFile(`./output/REF-${elevation}-${size}.png`, plots[elevation].REF),
|
||||
writePngToFile(`./output/VEL-${elevation}-${size}.png`, plots[elevation].VEL),
|
||||
]);
|
||||
}));
|
||||
}));
|
||||
})();
|
||||
Reference in new issue
Block a user