adjust reflectivity palette

This commit is contained in:
Matt Walsh committed 2021-08-12 14:48:20 -05:00
1 parent bf53273aa3
commit 4013d9a44d
2 files changed
+24 -9

No files matched your search

+18 -3
View File
@@ -8,10 +8,12 @@ const { plot, writePngToFile } = require('../src');
// list files
// const files = glob.sync('./data/KLOT/34/*');
// const files = glob.sync('./data/KLOT/381/*');
const files = glob.sync('./data/KLOT/548/*');
// const files = glob.sync('./data/KLOT/548/*');
// const files = glob.sync('./data/KLOT/940/*');
// const files = glob.sync('./data/KSRX/804/*');
// const files = glob.sync('./data/TORD/767/*');
const files = glob.sync('./data/KLOT/KLOT20210812_171451_V*'); // ref palette tuning
// const files = glob.sync('./data/KLOT/KLOT20210621_041151_V06'); // vel palette tuning
// const store each file's data
const chunks = [];
@@ -28,10 +30,23 @@ const radarData = Level2Radar.combineData(chunks);
// result array by elevations
const plots = [];
// default to all plots unless single is specificed
const single = process.argv.includes('single');
let sizes = [3600, 1800, 900, 800, 600, 450, 100];
let elevations = radarData.listElevations();
if (single) {
sizes = sizes.slice(0, 1);
// elevations where the lowest elevation is present, this is to ensure velocity is available
const firstElevationIndex = elevations.slice(0, 1)[0];
const lowestAngle = radarData.vcp.record.elevations[firstElevationIndex].elevation_angle;
elevations = elevations.filter((elevation) => radarData.vcp.record.elevations[elevation].elevation_angle === lowestAngle);
}
// 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) => {
await Promise.allSettled(sizes.map(async (size) => {
await Promise.allSettled(elevations.map(async (elevation) => {
plots[elevation] = plot(radarData, ['REF', 'VEL'], {
elevation,
size,
+6 -6
View File
@@ -1,8 +1,8 @@
const palette = [
255, 255, 255, 0, // transparent
0, 236, 236, 255,
1, 160, 246, 255,
0, 0, 246, 255,
0, 128, 128, 128,
1, 80, 128, 128,
0, 0, 128, 128,
0, 255, 0, 255,
0, 200, 0, 255,
0, 144, 0, 255,
@@ -16,9 +16,9 @@ const palette = [
153, 85, 201, 255,
// additional halfway to black values for cleaner picture
0, 118, 118, 128,
1, 80, 123, 128,
0, 0, 123, 128,
0, 64, 64, 64,
1, 40, 64, 64,
0, 0, 64, 64,
0, 128, 0, 128,
0, 100, 0, 128,
0, 72, 0, 128,