jwql
jwql copied to clipboard
Put Program IDs in order on the Archived Images page
It would be helpful for users if the program IDs were put in order on the Archived Images page for each instrument. At the moment the order of the IDs appear to be random, which makes it more difficult to find a particular program.
Bonus points: It might be nice to have different options for how to arrange the proposals. Once we are in flight and people are coming to the website to (e.g.) check the data that have been taken in the last few days, it might be easier to order the proposals by the date of execution.
Somehow I missed the big red button on the right side of the page that will allow the programs to be placed in ascending or descending order. The default ordering, when the page is first loaded, may be neither of these. (Is it random?) I just tried to double check, but the development server doesn't want to load any of the archived images pages for me at the moment.
On a particular instrument's Archived Images page, the button to sort the proposals into ascending or descending order works. But when the page is first loaded, the order is neither of these. Would be nice to have it load with the proposals in either ascending or descending order.
Similarly, on the page for a given instrument/program, when the page is loaded the order of the individual exposures is unclear. It's not in order of increasing/decreasing observation number, visit number, or detector name. It would be nice if upon loading the images were ordered by name.
For the Archived Images page, a potential solution would be within get_rpoposal_info() in data_containers.py, to sort the proposals
, and apply the same sorting to the thumbnail_paths
and num_files
variables before populating proposal_info
.
For the images page for a given proposal, it looks like the default sorting is most recent first/oldest last, although within this the detector names (for nircam) seem to be random. So perhaps an improvement for this would be:
- rename "default" to "most recent" in the drop down menu, so it's clear
- sort each file root by detector?
See towards the bottom of thumbnails_ajax() in data_containers.py for the location to sort things.
One place that is convenient for sorting by detector is just after the
available_files = [item for item in filenames if rootname in item]
line.
Programs now default to being shown in descending order, with Ascending and Recent as other options in the drop down. With the ability now to filter by detector on a program's page, the order of the detectors within each exposure is less important. Closing this, and if we decide later that we want to sort by detector, we can create a new issue.