def METHOD_NAME(filename = None):
    if not filename:
        import wx
        fdialog = wx.FileDialog(None, 'Select shift field',
                wildcard='*.sf;*.h5;*.h5r', style=wx.FD_OPEN)
        succ = fdialog.ShowModal()
        if (succ == wx.ID_OK):
            filename = fdialog.GetPath()
        else:
            return None
    ext = os.path.splitext(filename)[1]
    if ext in ['sf']:
        return np.load(filename)
    else:
        #try and extract shiftfield from h5 / h5r file
        try:
            import tables
            from PYME.IO.MetaDataHandler import HDFMDHandler
            h5file = tables.open_file(filename)
            mdh = HDFMDHandler(h5file)
            dx = mdh.getEntry('chroma.dx')
            dy = mdh.getEntry('chroma.dy')
            return [dx,dy]
        except:
            return None