code: def histogram2d(self,distance_modulus=None,delta_mag=0.03,steps=10000):
          
          if distance_modulus is not None:
              self.distance_modulus = distance_modulus
  
          # Isochrone will be binned, so might as well sample lots of points
          mass_init,mass_pdf,mass_act,mag_1,mag_2 = self.sample(mass_steps=steps)
  
          #logger.warning("Fudging intrinisic dispersion in isochrone.")
          #mag_1 += np.random.normal(scale=0.02,size=len(mag_1))
          #mag_2 += np.random.normal(scale=0.02,size=len(mag_2))
  
          # We cast to np.float32 to save memory
          bins_mag_1 = np.arange(self.mod+mag_1.min() - (0.5*delta_mag),
                                 self.mod+mag_1.max() + (0.5*delta_mag),
                                 delta_mag).astype(np.float32)
          bins_mag_2 = np.arange(self.mod+mag_2.min() - (0.5*delta_mag),
                                 self.mod+mag_2.max() + (0.5*delta_mag),
                                 delta_mag).astype(np.float32)
   
          # ADW: Completeness needs to go in mass_pdf here...
          isochrone_pdf = np.histogram2d(self.mod + mag_1,
                                         self.mod + mag_2,
                                         bins=[bins_mag_1, bins_mag_2],
                                         weights=mass_pdf)[0].astype(np.float32)
   
          return isochrone_pdf, bins_mag_1, bins_mag_2
docs: Return a 2D histogram the isochrone in mag-mag space.
  
          Parameters:
          -----------
          distance_modulus : distance modulus to calculate histogram at
          delta_mag : magnitude bin size
          mass_steps : number of steps to sample isochrone at
  
          Returns:
          --------
          bins_mag_1 : bin edges for first magnitude
          bins_mag_2 : bin edges for second magnitude
          isochrone_pdf : weighted pdf of isochrone in each bin