def getfmt(n,dtype ="d"):
        """
	Generates the binary format n dtype
	defualts to double
        @param n: number of particles
        @param dtype: data type
        returns the format string used to decode the binary data
        """
        fmt = ""
        fmt += dtype
        for i in range(n):
                fmt += dtype
        return fmt