示例#1
0
    def load_data(self):

        FileStack = plugin_manager.get_plugin('FileStack')
        BinaryFile = plugin_manager.get_plugin('BinaryFile')

        # read the same data twice, stacked together
        path = [self.path] * 2
        ff = FileStack(path,
                       BinaryFile,
                       dtype=self.dtype,
                       header_size=self.header_size)

        # also stack the data
        self.data = numpy.concatenate([self.data, self.data], axis=0)

        return ff
示例#2
0
 def load_data(self):
     
     FileStack = plugin_manager.get_plugin('FileStack')
     BinaryFile = plugin_manager.get_plugin('BinaryFile')
     
     # read the same data twice, stacked together
     path = [self.path]*2
     ff = FileStack(path, BinaryFile, dtype=self.dtype, header_size=self.header_size)
     
     # also stack the data
     self.data = numpy.concatenate([self.data, self.data], axis=0)
     
     return ff
     
     
     
 
     
示例#3
0
    def load_data(self):

        CSVFile = plugin_manager.get_plugin('CSVFile')
        names = ['x', 'y', 'z', 'vx', 'vy', 'vz']
        return CSVFile(self.path,
                       names,
                       dtype='f4',
                       delim_whitespace=True,
                       header=None,
                       blocksize=5000)
示例#4
0
 def load_data(self):
     
     BinaryFile = plugin_manager.get_plugin('BinaryFile')
     return BinaryFile(self.path, self.dtype, header_size=self.header_size)
示例#5
0
 def load_data(self):
     
     CSVFile = plugin_manager.get_plugin('CSVFile')
     names = ['x', 'y', 'z', 'vx', 'vy', 'vz']
     return CSVFile(self.path, names, dtype='f4', delim_whitespace=True, header=None, blocksize=5000)
示例#6
0
def RaDecDataSource(d):
    from nbodykit import plugin_manager
    source = plugin_manager.get_plugin('RaDecRedshift')
    d['unit_sphere'] = True
    return source.from_config(d)
示例#7
0
    def load_data(self):

        BinaryFile = plugin_manager.get_plugin('BinaryFile')
        return BinaryFile(self.path, self.dtype, header_size=self.header_size)