def _get_partition(self, i):
     """
     The partition should look like ("var_name", int, int...), where the
     number of ints matches the number of coordinate axes in the named
     variable, and is between 0 and the number of chunks in each axis. For
     an array, as opposed to a dataset, omit the variable name.
     """
     return get_partition(self.url, self.headers, self._source_id,
                          self.container, i)
Exemple #2
0
    def _load_metadata(self):
        """
        Load the data from remote.

        Tricky thing here is that intake uses the code ´get_partition´ triggering
        the read or _get_partition from the local driver on the server side (see ../containers/AccLat.py).
        This returns a ´single object´, making it not so easy to return the data stored in the
        different files in a straightforward way. Therefor I decided to the serverside plugin
        driver return a tuple of datasets, stored in attributes,
        allowing for the different format return functions. The read or get_partition functions
        then return the easiest format - namely the latticejson format.
        """
        if self._json is None:
            self._tracy, self._json, self._madx, self._lte, self.twiss = get_partition(
                self.url, self.headers, self._source_id, self.container, None
            )

        return self._schema