We noticed twice this week that slice1 when used in a script doesn't include the %{CONTEXT} in the result's label, so there's no feedback about where the slice was done. For example:
ds= getDataSet('vap+cdaweb:ds=PSP_FLD_L3_RFS_HFR&filter=psp&id=psp_fld_l3_rfs_hfr_auto_averages_ch0_V1V2&timerange=2021-12-01')
plot(0,ds[:,0])
doesn't show the slice location, but loading
vap+cdaweb:ds=PSP_FLD_L3_RFS_HFR&filter=psp&id=psp_fld_l3_rfs_hfr_auto_averages_ch0_V1V2&timerange=2021-12-01
and then interactively slicing with |slice1(1) will show the context. (The context property is in the dataset either way.)
Mouse is pointing at the context. The second image is the result of the script where the context is not shown.
Last edit: Jeremy Faden 2024-11-15
This data has a rank 2 DEPEND_1, meaning the DEPEND_1 is time-varying. There is code that checks to see if the slice position is actually constant and can be collapsed, and this is probably why there is inconsistent behavior. I will make it so both paths are consistent.
The problem is that the title doesn't have "%{CONTEXT}" in it, which is added when the slice operation is found in the plotElement.component property.