You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, cellbase preferences are stored in getpref/setpref('cellbase','preferencename','preferencevalue'). Since these preferences are not part of the cellbase mat-file (Cellbase.mat by default), they are not being directly shared when sharing cellbase files and cellbase data folder. In addition, choosecb() seems to have bugs not preserving all of the preferences of a cellbase. Most preferences are cellbase-specific, i.e. could be different for different cellbases.
I would suggest to save all cellbase-specific preferences in a PREFERENCES variable in the cellbase mat-file (Cellbase.mat by default). This would require small changes in quite a lot of locations, i.e. most calls of setpref/getpref. It would also not be fully back-compatible. The best feasible almost-back-compatible approach I can think of is having a function which creates default parameters in the new system if they are not already there, or reads from the current cellbase preferences.
The text was updated successfully, but these errors were encountered:
I started a branch preferences 5657292 solving this issue.
There is a new variable PREFERENCES in the Cellbase.mat (default name) when calling initcb. It will initialize with default preferences. There are new getter/setter functions to set and get preferences. If there is no PREFERENCES variable, there is an import function, which can set default parameters or import from getpref('cellbase').
New functions
getcbpref
setcbpref
default_preferences
import_preferences
Note that default_preferences and import_preferences do have not be explicitly called. They are called in initcb and other functions when needed. When changing or accessing cellbase preferences, one should use the setter/getter getcbpref/setcbpref. Note also that there are still global cellbase settings such as filename and path to cellbase and data directories. These are also needed to support swichting between cellbases and accessed via setpref/getpref. I realize that this could be confusing so I ensured that you can also get and set those global preferences using the new functions getcbpref/setcbpref.
I also updated the function references, please check (in the database section).
Outstanding issues
please test & comment!
update general documentation and release notes, at least when merging to master.
Currently, cellbase preferences are stored in getpref/setpref('cellbase','preferencename','preferencevalue'). Since these preferences are not part of the cellbase mat-file (Cellbase.mat by default), they are not being directly shared when sharing cellbase files and cellbase data folder. In addition, choosecb() seems to have bugs not preserving all of the preferences of a cellbase. Most preferences are cellbase-specific, i.e. could be different for different cellbases.
I would suggest to save all cellbase-specific preferences in a PREFERENCES variable in the cellbase mat-file (Cellbase.mat by default). This would require small changes in quite a lot of locations, i.e. most calls of setpref/getpref. It would also not be fully back-compatible. The best feasible almost-back-compatible approach I can think of is having a function which creates default parameters in the new system if they are not already there, or reads from the current cellbase preferences.
The text was updated successfully, but these errors were encountered: