Skip to content

nigeLab_Parsing_Block

Max-Home-Tower edited this page Jul 1, 2020 · 3 revisions

How does nigeLab automatically parse metadata?

Really, it doesn't; instead, nigeLab assumes that you will use a consistent naming convention for all your recordings of a given experiment. If you haven't done so, no need to worry- just rename your recording files using any number of convenient batch filename renaming tools you can find online.

Example

Consider the first recording (Block) of the first Animal extracted using nigeLab_demo.m (if you haven't checked that, look here first). Its name is:

'R19-94_2019_05_27_Site2A-Solenoid-0_190527_100729'

The delimiter between fields, in this case, is the underscore.

pars.Delimiter   = '_';

The naming convention is defined in +nigeLab/+defaults/Block.m.

pars.NamingConvention={'AnimalID','Year','Month','Day','RecID', 'RecDate' 'RecTime'}; 

If you have a different naming convention, you should be able to modify this line. Please note that the parsed metadata variables follow a CamelCase naming convention, which may be convenient to follow to facilitate future development.

There are two "special" metadata fields which must be parsed in some way, or else they will be automatically created using a random alphanumeric combination. These are:

  • AnimalID
  • RecID

Clone this wiki locally