Spectrum databases and subsets¶
A spectrum database is a single .stream file holding, for every dye, its excitation
and emission spectra, its names and its chemistry. BFSpectra always has exactly one
database open; the window caption names it and says how many dyes it contains.
At start-up BFSpectra opens the default database,
C:\Users\Public\Documents\BFSpectra\BFSpectraDB.stream.
Opening and saving¶
Open DB opens any .stream database. The dye table is refilled and the caption
updated.
Saving¶
Save DB asks for a file name - it suggests the current one - sorts the dyes by name and writes the file. Saving under a new name makes that file the current database.
Some changes are written immediately and some are not:
| Change | Written to disk |
|---|---|
| Edit a dye and press Save in the editor | Immediately, to the current database file. The same dye is also updated in every saved subset |
| Delete a dye (right-click in the table) | Only when you next Save DB or edit a dye |
| New Db, Update DB, Read SVG | When you confirm the save dialog those commands show |
Building a database from files¶
Both commands below ask for a folder and read every *.txt and *.csv file in it. See
File formats for what those files must look
like.
New Db builds a brand-new database from the folder alone.
Update DB starts from a copy of the current database and merges the folder into it:
- a file for a dye that is not yet in the database adds it;
- a file for a dye that is already there replaces that dye's spectrum. Its names and chemistry are kept.
Either way a save dialog follows. Nothing is changed if you cancel it. After saving, the new file becomes the current database.
Spotting bad spectra
After an import, scroll the table for dye names on a red background. Red means the excitation or emission curve is missing, or its wavelengths are not in a sensible order. See The dye table.
Every imported spectrum is normalised so that its peak is 1.
Importing from SVG¶
Web spectra viewers (FPbase, FluoroFinder and similar) can export their plots as SVG. Read SVG reads one or several such files, extracts the excitation and emission curve of the dye in each, and adds them to a copy of the current database - replacing the spectrum of a dye with the same name. A save dialog follows.
BFSpectra reads the axis tick labels to calibrate wavelength and intensity, so the SVG does not have to be of a particular size. Of the two curves, the one peaking at the shorter wavelength is taken as excitation. Files it cannot read are skipped silently.
Subsets¶
A subset is an ordinary database file stored in
C:\Users\Public\Documents\BFSpectra\BFSubSets\, typically holding only the dyes you
actually have in the freezer, or the dyes of one project.
The subset box on the toolbar lists Default DB followed by every subset. Choosing one opens it. The checked dyes stay checked, matched by name, when you switch.
To create a subset, check the dyes you want and press Add Set. Give it a name. If a subset of that name exists you are asked before it is overwritten. The new subset becomes the current database.
To delete a subset, delete its .stream file from BFSubSets\ in Explorer and choose
another entry in the subset box.
Note
In this version the Del Set button has no action.
Editing a dye's information in any database also updates the same dye in every subset, so names and structures stay consistent. Spectra imported with Update DB or Read SVG are not pushed into subsets.