16 views
--- tags: SPICE, Qt, Quicklook --- # 2023-09-26 Quicklook Qt meeting Participants: **David, Frédéric, Éric, Claude, Alfred** * [Previous notes](https://codimd.math.cnrs.fr/l4T7u6INTHC3H7CXNMvuaw?both#) * [Next notes](https://codimd.math.cnrs.fr/qUGG2nXXQ9u0FHohWA-e8Q?both) Name: SQKL Viewer? ## Questions Questions are spotted by :question: below, please answer them when you see them... ## Ready to be checked :checkered_flag: - Some icons looked dark under windows (from Fred's computer) - OK - Put "Plots", "Levels" and "Zoom" options in QGroups so that there is a frame (to isolate them better). - OK - When loading remote data, several seconds delay before progress bar is displayed -> show progress bar before + hourglass - OK, there is a first bar appearing immediately, the loading time itself cannot be controlled and there can be no progress bar for this. - Nope, marche paaaaas (on Fred's computer, Windows 11) - Improve pixel accuracy in maps, see image below: (from Susanna's request) ![](https://codimd.math.cnrs.fr/uploads/upload_172bc9e88360137bf9b8e0c5cce6065b.png) - OK - Issue: zoom is looping -> implement a max - Same idea: update profile $I(\lambda)$ when the cross (white line) is moved through pixel edges, see below: ![](https://codimd.math.cnrs.fr/uploads/upload_e440da40011b2aac214838f9c25ad443.png) - OK - Fix pixel value on mouse hover: ![](https://codimd.math.cnrs.fr/uploads/upload_5d55053043ab83580f55a9f49d531d8c.png) - OK - Remove "Apply" button in global levels and add a thread that triggers when field value changes, stop previous threads if another field changed quickly or if Global radio button is checked (because local levels were potentially changed since) - OK - Values > 100 are not caught properly before being passed to nanpercentile() - Add buttons to cancel running processes in the footer, show whether they are done or cancelled then - OK gagné! - Cancel stops change of levels for current window, but does not cancel already done changes - Fixed: spectral profile bars seem to be shifted compared to fit ![](https://codimd.math.cnrs.fr/uploads/upload_844dfe799bbaef57b7d496cd4efff616.png) - OK - Fit color changed to purple (fine for black or white backgrounds) - Much nicer! - $\lambda$ indexes are now kept in $I(\lambda)$ ![](https://codimd.math.cnrs.fr/uploads/upload_a77b02758ce5756869376a17e22e42f5.png) - OK, but force lambda range to be fixed. Range should change only when zooming. - Need to display fit values & pixel values as binned (or not) data values. Need to keep 3 cubes: original, binned & 8 bits scaled. - Cross in maps more visible, color black or white according to selected background ![](https://codimd.math.cnrs.fr/uploads/upload_0d1953e429bcbe7a9d22ada605b9eba8.png) - OK - Fixed: max % levels text boxes too small - OK - Change size policy of left part of splitter so that left panel takes always the minimum size required - Bug on windows: Open file - > Cancel - > Frozen - Add shortcuts for open file (Ctrl O) - Changing scale to logarithmic or other (and pressing Apply) has no visible effect :question: Code reviewed but same result, what's wrong? below: ![](https://codimd.math.cnrs.fr/uploads/upload_e1071b8015be4785caf1d63dee140e11.png) - Nothing wrong! Find the min max first (on orginal data), then apply stretch. Eventually use astropy.visualization AsymmetricPercentileInterval and LinearStretch / SquareRootStretch / LogStretch - By default, set "lambda rescaling" to 15 (not 1) - OK - Limit "de-zoom" to original value - OK, but apply also to profile - Fred: To test Gaussian fits in a difficult case, David: I used max value, issue with barycenter if several peaks, see below ![](https://codimd.math.cnrs.fr/uploads/upload_4b6a80b17578e184ea654c400b1fc71d.png) ![](https://codimd.math.cnrs.fr/uploads/upload_255af01f885d91203e9828c51a074c9d.png) - OK :question: David: here is a thought, can we compute $\chi^2$ and keep trying to fit with different bounds and different ways (val max, barycenter, other...) as long as $\chi^2$ is bad, we stop when $\chi^2<C$ - Naaaaaan - but add χ² value next to fit parameterd - Fred: Fits for the file below works well (all windows), David: still seems ok with the new code - Great ! ![](https://codimd.math.cnrs.fr/uploads/upload_33a57325c76ef299bf7c5b8a0e729faf.png) - Use unicode λ and σ where possible (in order to make checkbox's labels work on click) (David: done, labels on click works but we lose the subscript position for $I_{max}$ and $\lambda_{max}$) - OK, remove the max - Force tooltip design (background white instead of low opacity on some systems) - Soom tooltips not opaque yet ... - Rename "Zoom options" to "Zoom" - OK - Rename title above $I(\lambda)$ e.g. "$I(x=12, y=230, \lambda)$" instead of "$I(\lambda)$ with $x=12, y=230$" - OK - Fit maps bars: default range should be wider (than y∈[200;800]), and there should be no lower limit at 200px - OK ## Remains to do - The fitted curve (in purple) could be drawn with a better x-resolution than the data :question: David: I will do it next. Do we want to perform this only for the display or in every fit map calculation? ![](https://codimd.math.cnrs.fr/uploads/upload_5cc0c250ceb12a65fd88067738596c53.png) - Connect export button to pyqtgraph export menu :point_right: *There is an issue with that: for the moment I can make it work only if the right click was done by the user first. It creates or "unlocks" some objects, required by pyqtgraph to display the export menu.* - Adapt app. to Full Spectrum input files (i.e. STUDYTYP == Single Exposure): remove map x,y, gaussian fit and fit maps - Review pop-ups with explanations :question: Shall we replace them by a link to the user documentation instead? - Sort processes in the footer (by running ones, then date) ## Other questions :question: Do we want the "leveled" or original values in $I(\lambda)$? - Put real values here Example: ![](https://codimd.math.cnrs.fr/uploads/upload_8a8ebeb2f79d91b1a2b3aaec566c7754.png) :question: By the way, we could also suggest to crop the left part in $I(\lambda)$ (instead/besides max level treshold) in order to compute a relevant fit in this case? - original values