This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "pyedflib", | |
| # "numpy", | |
| # ] | |
| # /// | |
| """ | |
| Generate a synthetic BDF+ file carrying a trigger stream at realistic length. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "pyedflib", | |
| # "numpy", | |
| # ] | |
| # /// | |
| """ | |
| Generate a small EDF+C file whose annotations are shaped the awkward ways real writers emit them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "pyedflib", | |
| # "numpy", | |
| # ] | |
| # /// | |
| """ | |
| Generate a small EDF+C file that populates every metadata field the format offers. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "kilosort==4.1.7", | |
| # "spikeinterface==0.104.8", | |
| # "numpy", | |
| # "torch", | |
| # ] | |
| # | |
| # [[tool.uv.index]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [ | |
| # "h5py", | |
| # "numpy", | |
| # ] | |
| # /// | |
| """Generate small synthetic BRW v3.x (BioCam / 3Brain) files with known sample values. | |
| Source: none. These are written from the format specification, not cut down from a |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [] | |
| # /// | |
| """Stub two Neurophotometrics (NPM) sessions from the GuPPy sample set. | |
| sampleData_NPM_3 -> multi_timestamp/ a column-multiplexed recording carrying two timestamp | |
| columns, SystemTimestamp (device clock) and ComputerTimestamp (host clock), | |
| with four regions in the short G0-G3 naming. Its companion ttls.csv event | |
| file is already tiny and is copied verbatim. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = ["pandas"] | |
| # /// | |
| """Stub the two Neurophotometrics (NPM) sample sessions down to tiny CI fixtures. | |
| Source: the two raw NPM sessions from gin ophys PR #48 (extracted to ../source/): | |
| - npm4 = sampleData_NPM_4 (NEWER format: header + `Flags`/LedState column, | |
| `Region*G` columns; events labelled True/False) | |
| - npm5 = sampleData_NPM_5 (OLDER format: no header, 4 columns time+3 regions, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [] | |
| # /// | |
| """Cut a Neurophotometrics prefix whose startup frame is coded 0. | |
| The startup frame is written three different ways across recordings: 0 here, 7 in the multifile_split | |
| and multi_timestamp files, and 16 in by_column and red_and_green_emission. All three mean the same | |
| thing, a frame that is not a single excitation, so a reader keying on any particular value rather | |
| than on the excitation bits fails on at least one of them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [] | |
| # /// | |
| """Cut a Neurophotometrics prefix carrying red and green emission columns side by side. | |
| Two red and two green regions in the long Region<N><band> naming, so the emission band has to be | |
| read off the column name. Three excitations rather than the usual two, each strobed on its own frame | |
| (17, 18, 20 = 415, 470, 560 with output 0 held high for the whole recording), plus a startup frame | |
| of 16. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # /// script | |
| # requires-python = ">=3.10" | |
| # dependencies = [] | |
| # /// | |
| """Cut a Neurophotometrics prefix in which one state value covers two excitations. | |
| The inverse of the multi_led_state_per_wavelength case. This rig strobes 470 nm and 560 nm together | |
| in one frame and 415 nm alone in the next, so the state column alternates 6 and 1 and the file | |
| contains no 2 anywhere. The two simultaneous excitations do not interfere because their emission | |
| bands land on opposite halves of the camera sensor, and therefore in different columns: a single 6 |
NewerOlder