@@ -3,9 +3,9 @@ import Accordion from 'primevue/accordion'
33import AccordionPanel from ' primevue/accordionpanel'
44import AccordionHeader from ' primevue/accordionheader'
55import AccordionContent from ' primevue/accordioncontent'
6- import { defineAsyncComponent , ref } from ' vue'
6+ import { defineAsyncComponent , ref , computed } from ' vue'
77import { useReqParamsStore } from ' @/stores/reqParamsStore'
8- import { computed } from ' vue '
8+ import { photonProcessingAPIs } from ' @/types/SrStaticOptions '
99
1010/* eslint-disable @typescript-eslint/promise-function-async */
1111const SrYAPC = defineAsyncComponent (() => import (' @/components/SrYAPC.vue' ))
@@ -39,6 +39,33 @@ const reqParamsStore = useReqParamsStore()
3939const props = defineProps <Props >()
4040const expandedPanels = ref <number []>([])
4141
42+ const isPhotonProcessingAPI = computed (() => photonProcessingAPIs .has (props .iceSat2SelectedAPI ))
43+
44+ // Fixed segment dimensions baked into pre-computed ATL06/ATL08 data products.
45+ // Source: ICESat-2 ATL06 / ATL08 product specifications.
46+ const fixedExtentsByAPI: Record <string , { len: number ; res: number }> = {
47+ atl06x: { len: 40 , res: 20 },
48+ atl08x: { len: 100 , res: 100 }
49+ }
50+
51+ const fixedExtents = computed (() => fixedExtentsByAPI [props .iceSat2SelectedAPI ] ?? null )
52+
53+ const fixedExtentsTooltip = computed (() => {
54+ const api = props .iceSat2SelectedAPI
55+ return ` Segment dimensions are fixed in the ${api } data product and cannot be modified. `
56+ })
57+
58+ // Panels that show parameters used at request time are visible when the
59+ // selected endpoint actually consumes them. X-series endpoints read pre-computed
60+ // segments from the source HDF5 product so most photon-processing panels are hidden.
61+ const showExtentsPanel = computed (() => isPhotonProcessingAPI .value || fixedExtents .value !== null )
62+ const showSurfaceElevationPanel = computed (() =>
63+ [' atl06p' , ' atl06sp' , ' atl03x-surface' ].includes (props .iceSat2SelectedAPI )
64+ )
65+ const showPhoRealPanel = computed (() =>
66+ [' atl08p' , ' atl03x-phoreal' ].includes (props .iceSat2SelectedAPI )
67+ )
68+
4269const onPanelOpen = (value : any ) => {
4370 // console.log('onPanelOpen', value, "type: ", typeof value);
4471 expandedPanels .value .push (value .index )
@@ -86,41 +113,45 @@ const fieldsHeader = computed(() => {
86113 <SrGranuleSelection />
87114 </AccordionContent >
88115 </AccordionPanel >
89- <AccordionPanel value="3" v-if =" mission === ' ICESat-2' " >
116+ <AccordionPanel value="3" v-if =" mission === ' ICESat-2' && isPhotonProcessingAPI " >
90117 <AccordionHeader >Photon Selection</AccordionHeader >
91118 <AccordionContent v-if =" isExpanded (3 )" >
92119 <SrAtl03Classification />
93120 <SrAtl08Cnf />
94121 <SrYAPC />
95122 </AccordionContent >
96123 </AccordionPanel >
97- <AccordionPanel value="4" v-if =" mission === ' ICESat-2' " >
124+ <AccordionPanel value="4" v-if =" mission === ' ICESat-2' && showExtentsPanel " >
98125 <AccordionHeader >Extents</AccordionHeader >
99126 <AccordionContent v-if =" isExpanded (4 )" >
100- <SrExtents />
127+ <SrExtents v-if =" isPhotonProcessingAPI " />
128+ <div
129+ v-else-if =" fixedExtents"
130+ class =" sr-fixed-extents"
131+ v-tooltip.top =" fixedExtentsTooltip"
132+ >
133+ <div class =" sr-fixed-extents-header" >
134+ <i class =" pi pi-lock" ></i >
135+ <span >Fixed in {{ iceSat2SelectedAPI }} data product</span >
136+ </div >
137+ <div class =" sr-fixed-extents-row" >
138+ <span class =" sr-fixed-extents-label" >Length</span >
139+ <span class =" sr-fixed-extents-value" >{{ fixedExtents.len }} m</span >
140+ </div >
141+ <div class =" sr-fixed-extents-row" >
142+ <span class =" sr-fixed-extents-label" >Step Size</span >
143+ <span class =" sr-fixed-extents-value" >{{ fixedExtents.res }} m</span >
144+ </div >
145+ </div >
101146 </AccordionContent >
102147 </AccordionPanel >
103- <AccordionPanel
104- value="5"
105- v-if ="
106- mission === ' ICESat-2' &&
107- (props .iceSat2SelectedAPI .includes (' atl06' ) ||
108- props .iceSat2SelectedAPI .includes (' atl03x-surface' ))
109- "
110- >
148+ <AccordionPanel value="5" v-if =" mission === ' ICESat-2' && showSurfaceElevationPanel " >
111149 <AccordionHeader >Surface Elevation</AccordionHeader >
112150 <AccordionContent v-if =" isExpanded (5 )" >
113151 <SrSurfaceElevation />
114152 </AccordionContent >
115153 </AccordionPanel >
116- <AccordionPanel
117- value="6"
118- v-if ="
119- mission === ' ICESat-2' &&
120- (props .iceSat2SelectedAPI .includes (' atl08' ) ||
121- props .iceSat2SelectedAPI .includes (' atl03x-phoreal' ))
122- "
123- >
154+ <AccordionPanel value="6" v-if =" mission === ' ICESat-2' && showPhoRealPanel " >
124155 <AccordionHeader >PhoREAL Veg Density Alg</AccordionHeader >
125156 <AccordionContent v-if =" isExpanded (6 )" >
126157 <SrVegDensity />
@@ -331,4 +362,40 @@ const fieldsHeader = computed(() => {
331362 justify-content : center ;
332363 margin-bottom : 0.5rem ;
333364}
365+
366+ .sr-fixed-extents {
367+ display : flex ;
368+ flex-direction : column ;
369+ gap : 0.5rem ;
370+ padding : 0.75rem ;
371+ border : 1px solid var (--p-surface-300 );
372+ border-radius : var (--p-border-radius );
373+ cursor : help ;
374+ }
375+
376+ .sr-fixed-extents-header {
377+ display : flex ;
378+ align-items : center ;
379+ gap : 0.5rem ;
380+ font-size : small ;
381+ color : var (--p-text-muted-color );
382+ margin-bottom : 0.25rem ;
383+ }
384+
385+ .sr-fixed-extents-row {
386+ display : flex ;
387+ justify-content : space-between ;
388+ align-items : center ;
389+ padding : 0.25rem 0.5rem ;
390+ opacity : 0.7 ;
391+ }
392+
393+ .sr-fixed-extents-label {
394+ font-size : large ;
395+ }
396+
397+ .sr-fixed-extents-value {
398+ font-family : monospace ;
399+ font-size : large ;
400+ }
334401 </style >
0 commit comments