def METHOD_NAME(ccdfn, info={}, eps=1e-3, Bfield=False):
    '''
    Convert CCD coil dipole files to nifti1 format
    Parameters
    ----------
    ccdfn : string
        CCD file.
    resolution : ndarray, optional
        Resolution (dx,dy,dz). The default is (3,3,3).
    boundingbox : ndarray, optional
        Bounding box ((xmin,xmax),(ymin,ymax),(zmin,zmax)).
        The default is ((-300, 300), (-200, 200), (0, 300)).
    dIdt : float, optional
        Maximum dIdt. The default is None.
    eps : float, optional
        precision for fmm3dpy. The default is 1e-3.
    Returns
    -------
    nii : Nifti1Volume
        Nifti1Volume containing dA/dt field.
    '''
    #read and parse ccd file
    d_position, d_moment, boundingbox, resolution, info = parseccd(ccdfn)
    if not boundingbox[0] is None:
        bb = boundingbox
    else:
	    bb = np.array(((-300, 300), (-200, 200), (0, 300)))
    if not resolution[0] is None:
        res = resolution
    else:
        res = np.array((3., 3., 3.))
    #create grid
    dx = np.spacing(1e4)
    x = np.arange(bb[0][0], bb[0][1] + dx, res[0]) #xgrid
    y = np.arange(bb[1][0], bb[1][1] + dx, res[1]) #ygrid
    z = np.arange(bb[2][0], bb[2][1] + dx, res[2]) #zgrid
    xyz = np.meshgrid(x, y, z, indexing='ij') #grid
    #reshape to 2D
    xyz = np.array(xyz).reshape((3, len(x) * len(y) * len(z)))
    xyz *= 1.0e-3 #from mm to SI (meters)
    if Bfield:
        A = coil_numpy.B_from_dipoles(d_moment, d_position, xyz.T)
    else:
        A = coil_numpy.A_from_dipoles(d_moment, d_position, xyz.T)
    A = A.reshape((len(x), len(y), len(z), 3))
    #header info
    hdr = nib.Nifti1Header()
    hdr.set_data_dtype(np.float32)
    hdr.set_xyzt_units('mm','unknown')
    #affine matrix
    M = np.identity(4) * np.array((res[0], res[1], res[2], 1))
    M[0, 3] = x[0]
    M[1, 3] = y[0]
    M[2, 3] = z[0]
    #create nifti1 volume
    nii = nib.Nifti1Image(A, M, hdr)
    #set dIdtmax if availible
    try:
        dstr = f"dIdtmax={info['dIdtmax']}"
        try:
            dstr += f";coilname={info['coilname']}"
        except:
            pass
        try:
            dstr += f";stimulator={info['stimulator']}"
        except:
            pass
        try:
            dstr += f";brand={info['brand']}";
        except:
            pass
        nii.header['descrip'] = dstr
    except:
        print('no information on dIdtmax found omitting from nii file.')
    return nii