Python code for curating Neurophotometrics data
This code was written to curate Neurophotometrics (NPM) data for analysis in pMat. In short, the NPM data is saved into two files: one containing the 415 control signals for every region recorded and the other the 470 gcamp signals for all regions recorded. However, pMat (currently) requires the opposite: one .csv files for each region that contains both the 415 and 470 signal. This requires quite a lot of copy and pasting which is tedious and prone to errors. This code was developed to automate this process.
How to use this code?
A specific file structure is necessary for using the NPM python module for curating Neurophotometric data. The below example is a minimum necessary structure for the code to work. In short, you must input a directory that contains subdirectoriesfor each subject that contain the raw NPM data files (which also need to be renamed to .NPM.csv in order to be detected).
Data/ <---- This is the directory (path) that should be input to the curate_NPM() function.
|-- Rat1/
| |-- Rat1_415_data.npm.csv
| |-- Rat1_470_data.npm.csv
|-- Rat2/
| |-- Rat2_415_data.npm.csv
| |-- Rat2_470_data.npm.csv
| ...
|-- RatN/
| |-- RatN_415_data.npm.csv
| |-- RatN_470_data.npm.csv
For a more general project file tree, I highly recommend something like the following to keep all of the experimental days and freezing data organized.
Data/
|-- Day1/ <---- This is the directory (path) that should be input to the "curated_NPM()" function.
| | -- Rat1/
| | |-- Rat1_415_data.npm.csv
| | |-- Rat1_470_data.npm.csv
| | |-- Freezing data/
| | | |-- freezing_files <---- Notice that freezing files are kept in their own folder
|
|-- Day2/ <---- This is the directory (path) that should be input to the "curated_NPM()" function.
| | -- Rat1/
| | |-- Rat1_415_data.npm.csv
| | |-- Rat1_470_data.npm.csv
| | |-- Freezing data/
| | | |-- freezing_files
General work flow
-
Organize the data into the above file structure
-
Rename all NPM data to have ".NPM.csv" at the end
-
Open your desired IDE (jupyter, spyder, etc)
-
Import this module
import NPMpy as NPM -
Run curate_NPM(path_to_your_data)
-
Done!
Metadata
Release files for NPMpy 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| NPMpy-0.1.6.tar.gz | 3.9 kB | Without provenance | Details for NPMpy-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| NPMpy-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for NPMpy-0.1.6-py3-none-any.whl |
Total release size: 8.7 kB
Release files / NPMpy-0.1.6.tar.gz
| Download URL | NPMpy-0.1.6.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
61a94923b250134f2918d0758accd70019589de65c570d82c942ab65ddf85b56
|
|
BLAKE2b-256 checksum How to use checksums |
c17509350fbf590a7d637b0a1306079fb41edb2c4f4478a34cb0e62aee7717fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.7
|
Release files / NPMpy-0.1.6-py3-none-any.whl
| Download URL | NPMpy-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
73fa45f22ba0ddaca9fea0f6f7b2c0557fc114c3e1da5a781a415d4cfb6f034d
|
|
BLAKE2b-256 checksum How to use checksums |
6387719c9e43ced317aac7d74eca9a0386beea4e423122b161100ebc786c5b29
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.0.0.post20201207 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.7.7
|
Security for NPMpy 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.