Skip to content

Tutorial Create dataset project

areewitoelar edited this page Aug 20, 2025 · 4 revisions

Note

This page is currently being converted from this source: https://docs.google.com/document/d/1L-mNvQndJAmCoKHh_3m2bU1brHJnXJ_U9yFflwdR_RA/edit?tab=t.0

Caution

Work in progress

Setup New Project

  1. Create a New Project
    • Run: nansen.createProject()
    • Enter a short project name (this will be the subfolder where your project will be saved).
    • Select a folder to be the root folder of your Project.
    • Click Create New Project.

Caution

*Error in nansen.app.setup.SetupWizard/createModuleManagerUI

(line 241): if isfield(p.Preferences, 'DataModule')*

Pop up window may be created behind other windows—can cause confusion.

  1. Select Modules
    • Choose from:
      • Two Photon Imaging
      • NANSEN-NWB
      • Sharebrain
    • Click the right arrow to proceed.

Adding Data

  1. Add Data Locations

    • Specify the root of your dataset folder.
    • Clearly distinguish between Rawdata and Processed:
      • Processed folder will be created within the subfolder (default: [Rawdata]/Processed).
  2. Specify Data Organization

    • Clarify how far the organization goes: is it the subfolder containing .mat files, or the .mat files themselves?
  3. Detect Data Information

    • Subject ID / Session ID can be filled in automatically from subfolder information.
    • You can truncate and choose limited letters (e.g. m7123 for Subject ID and m7123-20220727-01 for Session ID).
    • Sessions will appear in a table.

Find Variables of Interest

  1. Switch to File Viewer
    • Right click on a .mat file.
    • Select Create New Variable From File.

Note

The above steps should be simplified—consider adding a Select Variables button.

  1. Data Variable Selector

    • Popup window with dropdown for selecting data variables.
    • Pick the variable.
  2. Create New Variable

    • Specify FileNameExpression. (e.g. _sessiondata)
    • Not clear what this is—may cause confusion. Suggestion: include all .mat files for now.

Note

Sometimes popup may appear off-screen or not visible. The Save icon may not be consistent with other UI elements.

- In the future, provide pre-made File Adapters in a dropdown menu.
- Consider a basic copy function for File Adapters.
- Example File Adapter should be available in `+fileadapter`.

Convert to NWB

  1. Configure NWB File
    • Go to Tools > Nwb > Configure NWB File
    • Set:
      • PrimaryGroupName = Acquisition
      • NwbModule = base
      • NeuroDataType = TimeSeries
    • Close the window to save (no save button).

Warning

This step should have default settings—users may not know what to select. A Save button should be added for clarity and confidence.

  1. Write NWB File
    • Return to Overview session tables.
    • Select session.
    • Go to Data > Nwb > Write NWB File.

Caution

If Processed folder is not found, errors will occur. If Processed folder is removed, unexpected behavior may result.

Clone this wiki locally