code: def calculate_chisq_bins(self, template, psd):
          
          num_bins = int(self.parse_option(template, self.num_bins))
          if hasattr(psd, 'sigmasq_vec') and \
                                         template.approximant in psd.sigmasq_vec:
              kmin = int(template.f_lower / psd.delta_f)
              kmax = template.end_idx
              bins = power_chisq_bins_from_sigmasq_series(
                     psd.sigmasq_vec[template.approximant], num_bins, kmin, kmax)
          else:
              bins = power_chisq_bins(template, num_bins, psd, template.f_lower)
          return bins
docs: Obtain the chisq bins for this template and PSD.