Edit attributes

Analysis › Process · version 1

Rename a column of the localizations, or remove columns.

What it does

Renames one attribute of the localizations, or removes attributes. An attribute named as another program or a script expects it, an attribute a step wrote under a name you regret, attributes nobody reads that make every save and every merge of blinks slower: this is the tool for them. It changes the table, so it is one step of the undo.

Attribute selectors in the other plugins follow at once: they list the attributes the table has now.

How it works

Rename. The attribute keeps its values and its place under the new name. What reads it by name follows where it can:

What names the attribute in a setting does not follow: a chain step, a plugin's saved settings, a region table measured by an id attribute. They fail the next time they run, with an error that names the attribute they did not find, and the setting is yours to change.

Remove. The ticked attributes are gone from the table. A derived attribute whose expression reads one of them keeps its values but is no longer recomputed when blinks are merged, and a filter bound the file kept on one goes with it, and so does a layer's filter on a removed attribute; the run says which, in a warning. A layer coloured by a removed attribute is drawn without colour.

In detail

What cannot be renamed or removed. The attributes the program finds by name to draw, merge or split the table are not offered and are refused by name: the positions x_nm, y_nm, z_nm; xy_err_nm, the precision the picture is drawn with; frame, filenumber and channel; group_id, n_in_group and group_use, which merging blinks writes and reads; tid, a MINFLUX trace, by which blinks are merged where it is there; and region_filter, which the region filter computes again from its conditions.

A new name is letters, digits and underscores, not starting with a digit, so that an expression can read it; not a function or a constant of an expression (max, pi), not one of the attributes above, and not a attribute the table already has.

An undo brings the old table back, the old name with it. The layers' bounds on the new name do not go back to the old one – a layer keeps no bound on an attribute its table does not have – so after an undo the filter on the attribute is set again by hand, and a layer's colour attribute, left on the new name, is drawn without colour until it is set again.

Parameters

settingdefaultwhat it does
operation
operation
rename an attributeRename one attribute, or remove the ticked ones.

Renaming is one attribute per run. Several attributes to remove are ticked together, one undo step.

Choices: rename an attribute; remove attributes
attribute
column
-The attribute to rename.

Only the attributes that may be renamed are listed.

new name
new_name
–Letters, digits and underscores, as an expression can read it.

Keep the field's convention, <quantity>_<unit> and <quantity>_err_<unit> for a precision: plugins look up a precision by that name.

remove
remove
The attributes to remove; positions, frame, file and the grouping attributes are not offered.

None is ticked to start with; tick the attributes to remove.

Output

The table, renamed or without the attributes, and a line in the history saying what changed and what followed: the recipes rewritten, the bounds moved or lost.

Differences from SMAP

Based on SMAP's RenameFields and RemoveFields (Ries 2020), one plugin here with an operation, one attribute renamed per run as in SMAP. The main changes:

References