def get_xfm(self, subject, name, xfmtype="coord"):
        """Retrieves a transform from the filestore

        Parameters
        ----------
        subject : str
            Name of the subject
        name : str
            Name of the transform
        xfmtype : str, optional
            Type of transform to return. Defaults to coord.
        """
        from .xfm import Transform
        if xfmtype == 'coord':
            try:
                return self.auxfile.get_xfm(subject, name)
            except (__HOLE__, IOError):
                pass

        if name == "identity":
            nib = self.get_anat(subject, 'raw')
            return Transform(np.linalg.inv(nib.get_affine()), nib)

        fname = os.path.join(self.filestore, subject, "transforms", name, "matrices.xfm")
        reference = os.path.join(self.filestore, subject, "transforms", name, "reference.nii.gz")
        xfmdict = json.load(open(fname))
        return Transform(xfmdict[xfmtype], reference)
dataset/ETHPy150Open gallantlab/pycortex/cortex/database.py/Database.get_xfm