def create_from_fits(cls, fitsfile, norm_type='eflux',
                         hdu_scan="SCANDATA",
                         hdu_energies="EBOUNDS",
                         irow=None):
        """Create a CastroData object from a tscube FITS file.

        Parameters
        ----------
        fitsfile  : str
            Name of the fits file

        norm_type : str
            Type of normalization to use.  Valid options are:

            * norm : Normalization w.r.t. to test source
            * flux : Flux of the test source ( ph cm^-2 s^-1 )
            * eflux: Energy Flux of the test source ( MeV cm^-2 s^-1 )
            * npred: Number of predicted photons (Not implemented)
            * dnde : Differential flux of the test source ( ph cm^-2 s^-1
              MeV^-1 )

        hdu_scan : str
            Name of the FITS HDU with the scan data

        hdu_energies : str        
            Name of the FITS HDU with the energy binning and
            normalization data

        irow : int or None
            If none, then this assumes that there is a single row in
            the scan data table Otherwise, this specifies which row of
            the table to use

        Returns
        -------
        castro : `~fermipy.castro.CastroData`

        """
        if irow is not None:
            tab_s = Table.read(fitsfile, hdu=hdu_scan)[irow]
        else:
            tab_s = Table.read(fitsfile, hdu=hdu_scan)
        tab_e = Table.read(fitsfile, hdu=hdu_energies)

        tab_s = convert_sed_cols(tab_s)
        tab_e = convert_sed_cols(tab_e)

        return cls.create_from_tables(norm_type, tab_s, tab_e)
Create a CastroData object from a tscube FITS file.

        Parameters
        ----------
        fitsfile  : str
            Name of the fits file

        norm_type : str
            Type of normalization to use.  Valid options are:

            * norm : Normalization w.r.t. to test source
            * flux : Flux of the test source ( ph cm^-2 s^-1 )
            * eflux: Energy Flux of the test source ( MeV cm^-2 s^-1 )
            * npred: Number of predicted photons (Not implemented)
            * dnde : Differential flux of the test source ( ph cm^-2 s^-1
              MeV^-1 )

        hdu_scan : str
            Name of the FITS HDU with the scan data

        hdu_energies : str        
            Name of the FITS HDU with the energy binning and
            normalization data

        irow : int or None
            If none, then this assumes that there is a single row in
            the scan data table Otherwise, this specifies which row of
            the table to use

        Returns
        -------
        castro : `~fermipy.castro.CastroData`