duderstadt-lab / mars-fx

BSD 2-Clause "Simplified" License
3 stars 1 forks source link

New data table column does not appear in plot options #61

Closed NadiaHuisjes closed 2 years ago

NadiaHuisjes commented 2 years ago

I remember that we spoke about this in the past, but I still find it confusing to encounter this issue. When I use a script to calculate a new data table column (f.e. to go from raw intensity to a background corrected one), the newly created column does not show up as one of the columns to choose from in the plot drop down menu's. Refreshing the plot does not solve the issue.

How can I update the system such that the new column does appear as one of the options? And how can we go about this issue to make it more user-friendly?

karlduderstadt commented 2 years ago

I think there should be a simple fix for this issue. We can add some code that checks the column names of the currently open table and makes sure all columns are available as options. This shouldn't be too complicated.

If you run rebuild indexes in the tools with the current version they should show up. At least as a temporary workaround.

Some background: When you first open an archive, as records and tables are read into memory, sets of all common properties are generated: the list of all unique column names, all unique tags etc.. These are used for all the selection options. These are not usually generated every time scripts are run on archive because for very large archives this is really time consuming. The tools, rebuild indexes goes through all records again and rebuilds these common properties.

I think it should be easy to add the solution I mentioned above. Thanks for pointing out this issue! Sorry for the trouble.