This is a collaborative space. In order to contribute, send an email to maximilien.chaumon@icm-institute.org
On any page, type the letter L on your keyboard to add a "Label" to the page, which will make search easier.

Mega write

function mega_write (filename, header,bin_data ,overwrite)

 

MEGA_WRITE creates a folder named filename and writes inside data.header and data.data

  • Before using mega_write, please add '/usr/global/matlab/mega_toolbox/mega_IO/ ' to your Matlab Path

Syntax

  • mega_write(filename,header)
  • mega_write(filename,header,bin_data)
  • mega_read(filenameheader,bin_data ,overwrite)
  • mega_read(filenameheader,bin_data ,event, overwrite)

Description

   mega_write(filename, header):  writes  header information into data.header. data.data will contain zero values.data.data and data.header will be stored in filename folder

mega_write(filename, header, bin_ata): writes header information into data.header and bin_data matrix into data.data. data.data and data.header will be stored in filename folder

   mega_write(filename, header, bin_data, overwrite):  tells whether to skip (overwrite=false) or write the file (overwrite true) filename if it already exists. if not specied, overwrite will be set to true and the file is overwritten

   mega_write(filename, header, bin_data, event, overwrite):  writes  header information into data.header, bin_data matrix into data.data and event into data.event. data.data, data.header and data.event will be stored in filename folder

Examples

            [h, b]= mega_read ('/lena13/home_users/users/datalinks/VALIDATION/example_data/lena_data/example_frequency_sensor_datablock_time.lena');
                    mega_write ('example1.lena', h)
                    will create a folder named example1.lena in the current folder. It will write inside 'data.header'containing header inforrmation from h a data.data file with zero values
            [h, b]= mega_read('/lena13/home_users/users/datalinks/VALIDATION/example_data/lena_data/example_frequency_sensor_datablock_time.lena');
                    mega_write ('example2.lena', h,b)
                    will create a folder named example2.lena in the current folder. It will write inside 'data.header' containing header inforrmation from h and data.data containing data in b
            [h, b,e]= mega_read('/lena13/home_users/users/datalinks/VALIDATION/example_data/lena_data/example_header_bin_event.lena','events');
                    mega_write ('example3.lena', h,b, e)
                    will create a folder named example3.lena in the current folder. It will create inside 'data.header' for header inforrmation from h,  data.data for binary data in b and data.event for event data











Back