Esempio n. 1
0
def file_writer(filename, signal, _rescale=True, **kwds):
    '''Writes data to tif using Christoph Gohlke's tifffile library
        
        Parameters
        ----------
        filename: str
        signal: a Signal instance
    '''

    imsave(filename, signal.data.squeeze(), **kwds)
Esempio n. 2
0
def file_writer(filename, signal, _rescale = True,  **kwds):
    '''Writes data to tif using Christoph Gohlke's tifffile library
        
        Parameters
        ----------
        filename: str
        signal: a Signal instance
    '''
    
    imsave(filename, signal.data.squeeze(), **kwds)
Esempio n. 3
0
def file_writer(filename, signal, **kwds):
    '''Writes data to tif using Christoph Gohlke's tifffile library

        Parameters
        ----------
        filename: str
        signal: a Signal instance

    '''
    data = signal.data
    if signal.is_rgbx is True:
        data = rgb_tools.rgbx2regular_array(data)
        photometric = "rgb"
    else:
        photometric = "minisblack"
    if description not in kwds:
        if signal.metadata.General.title:
            kwds['description'] = signal.metadata.General.title

    imsave(filename, data,
           software="hyperspy",
           photometric=photometric,
           **kwds)
Esempio n. 4
0
def file_writer(filename, signal, **kwds):
    '''Writes data to tif using Christoph Gohlke's tifffile library

        Parameters
        ----------
        filename: str
        signal: a Signal instance

    '''
    data = signal.data
    if signal.is_rgbx is True:
        data = rgb_tools.rgbx2regular_array(data)
        photometric = "rgb"
    else:
        photometric = "minisblack"
    if description not in kwds:
        if signal.metadata.General.title:
            kwds['description'] = signal.metadata.General.title

    imsave(filename,
           data,
           software="hyperspy",
           photometric=photometric,
           **kwds)