parameters: (
      rowsID_observed: np.ndarray,
      colsID_observed: np.ndarray,
      rowsID_calculated: np.ndarray,
      colsID_calculated: np.ndarray,
      bankname: str,
      npeaks: int,
  )
return_statement: return fig
docstring: Plot modern style plots for diagnostics
  
      @param rowsID_observed
      @param colsID_observed
      @param rowsID_calculated
      @param colsID_calculated
      @param bankname
      @param npeaks
  
      @return: figure handle
docstring_summary: Plot modern style plots for diagnostics
docstring_tokens: Plot modern style plots for diagnostics
function: def plot_bank_modern(
      rowsID_observed: np.ndarray,
      colsID_observed: np.ndarray,
      rowsID_calculated: np.ndarray,
      colsID_calculated: np.ndarray,
      bankname: str,
      npeaks: int,
  ) -> plt.Figure:
      """
      Plot modern style plots for diagnostics
  
      @param rowsID_observed
      @param colsID_observed
      @param rowsID_calculated
      @param colsID_calculated
      @param bankname
      @param npeaks
  
      @return: figure handle
      """
      # fancy plotting
      fig = plt.figure(figsize=(14, 7))
      gs = fig.add_gridspec(7, 15)
      # ---- CONFIG LAYOUT -----
      # -- col combo plot
      hist_observed_col = fig.add_subplot(gs[1:, 6])  # hist_y1
      hist_observed_col.get_yaxis().set_ticks([])
      hist_observed_col.set_xlabel("npeaks")
      hist_calculated_col = fig.add_subplot(gs[0, 0:6])  # hist_x1
      hist_calculated_col.get_xaxis().set_ticks([])
      hist_calculated_col.set_ylabel("npeaks")
      hist_calculated_col.set_title(f"{bankname}: Column")
      scatter_col = fig.add_subplot(gs[1:, 0:6])  # scatter1
      scatter_col.grid(color='k', linestyle='--', alpha=0.25)
      scatter_col.set_xlabel("calculated column number")
      scatter_col.set_ylabel("observed column number")
      # -- row combo plot
      hist_observed_row = fig.add_subplot(gs[1:, 14])  # hist_y2
      hist_observed_row.get_yaxis().set_ticks([])
      hist_observed_row.set_xlabel("npeaks")
      hist_calculated_row = fig.add_subplot(gs[0, 8:14])  # hist_x2
      hist_calculated_row.get_xaxis().set_ticks([])
      hist_calculated_row.set_ylabel("npeaks")
      hist_calculated_row.set_title(f"{bankname}: Row")
      scatter_row = fig.add_subplot(gs[1:, 8:14])  # scatter2
      scatter_row.grid(color='k', linestyle='--', alpha=0.25)
      scatter_row.set_xlabel("calculated row number")
      scatter_row.set_ylabel("observed row number")
      # ----- PLOT DATA -----
      # -- plot col
      max_coln = max(colsID_observed.max(), colsID_calculated.max())
      scatter_col.plot([0, max_coln], [0, max_coln], "k:", alpha=0.5)
      scatter_col.plot(colsID_calculated, colsID_observed, 'r+')
      scatter_col.set_xlim([-5, colsID_calculated.max() + 5])
      scatter_col.set_ylim([-5, colsID_observed.max() + 5])
      scatter_col.text(0.5, 0.2, f"Number of Peaks = {npeaks}", transform=scatter_col.transAxes)
      hist_calculated_col.hist(colsID_calculated, bins=1 + int(colsID_calculated.max()), color='red')
      hist_calculated_col.set_xlim([-5, colsID_calculated.max() + 5])
      hist_observed_col.hist(colsID_observed, bins=1 + int(colsID_observed.max()), color='red', orientation="horizontal")
      hist_observed_col.set_ylim([-5, colsID_observed.max() + 5])
      # -- plot row
      max_rown = max(rowsID_observed.max(), rowsID_calculated.max())
      scatter_row.plot([0, max_rown], [0, max_rown], "k:", alpha=0.5)
      scatter_row.plot(rowsID_calculated, rowsID_observed, 'b+')
      scatter_row.set_xlim([-5, rowsID_calculated.max() + 5])
      scatter_row.set_ylim([-5, rowsID_observed.max() + 5])
      scatter_row.text(0.5, 0.2, f"Number of Peaks = {npeaks}", transform=scatter_row.transAxes)
      hist_calculated_row.hist(rowsID_calculated, bins=int(rowsID_calculated.max()), color='blue')
      hist_calculated_row.set_xlim([-5, rowsID_calculated.max() + 5])
      hist_observed_row.hist(rowsID_observed, bins=int(rowsID_observed.max()), color='blue', orientation="horizontal")
      hist_observed_row.set_ylim([-5, rowsID_observed.max() + 5])
  
      return fig
function_tokens: def plot_bank_modern ( rowsID_observed : np . ndarray , colsID_observed : np . ndarray , rowsID_calculated : np . ndarray , colsID_calculated : np . ndarray , bankname : str , npeaks : int , ) -> plt . Figure : # fancy plotting fig = plt . figure ( figsize = ( 14 , 7 ) ) gs = fig . add_gridspec ( 7 , 15 ) # ---- CONFIG LAYOUT ----- # -- col combo plot hist_observed_col = fig . add_subplot ( gs [ 1 : , 6 ] ) # hist_y1 hist_observed_col . get_yaxis ( ) . set_ticks ( [ ] ) hist_observed_col . set_xlabel ( "npeaks" ) hist_calculated_col = fig . add_subplot ( gs [ 0 , 0 : 6 ] ) # hist_x1 hist_calculated_col . get_xaxis ( ) . set_ticks ( [ ] ) hist_calculated_col . set_ylabel ( "npeaks" ) hist_calculated_col . set_title ( f"{bankname}: Column" ) scatter_col = fig . add_subplot ( gs [ 1 : , 0 : 6 ] ) # scatter1 scatter_col . grid ( color = 'k' , linestyle = '--' , alpha = 0.25 ) scatter_col . set_xlabel ( "calculated column number" ) scatter_col . set_ylabel ( "observed column number" ) # -- row combo plot hist_observed_row = fig . add_subplot ( gs [ 1 : , 14 ] ) # hist_y2 hist_observed_row . get_yaxis ( ) . set_ticks ( [ ] ) hist_observed_row . set_xlabel ( "npeaks" ) hist_calculated_row = fig . add_subplot ( gs [ 0 , 8 : 14 ] ) # hist_x2 hist_calculated_row . get_xaxis ( ) . set_ticks ( [ ] ) hist_calculated_row . set_ylabel ( "npeaks" ) hist_calculated_row . set_title ( f"{bankname}: Row" ) scatter_row = fig . add_subplot ( gs [ 1 : , 8 : 14 ] ) # scatter2 scatter_row . grid ( color = 'k' , linestyle = '--' , alpha = 0.25 ) scatter_row . set_xlabel ( "calculated row number" ) scatter_row . set_ylabel ( "observed row number" ) # ----- PLOT DATA ----- # -- plot col max_coln = max ( colsID_observed . max ( ) , colsID_calculated . max ( ) ) scatter_col . plot ( [ 0 , max_coln ] , [ 0 , max_coln ] , "k:" , alpha = 0.5 ) scatter_col . plot ( colsID_calculated , colsID_observed , 'r+' ) scatter_col . set_xlim ( [ - 5 , colsID_calculated . max ( ) + 5 ] ) scatter_col . set_ylim ( [ - 5 , colsID_observed . max ( ) + 5 ] ) scatter_col . text ( 0.5 , 0.2 , f"Number of Peaks = {npeaks}" , transform = scatter_col . transAxes ) hist_calculated_col . hist ( colsID_calculated , bins = 1 + int ( colsID_calculated . max ( ) ) , color = 'red' ) hist_calculated_col . set_xlim ( [ - 5 , colsID_calculated . max ( ) + 5 ] ) hist_observed_col . hist ( colsID_observed , bins = 1 + int ( colsID_observed . max ( ) ) , color = 'red' , orientation = "horizontal" ) hist_observed_col . set_ylim ( [ - 5 , colsID_observed . max ( ) + 5 ] ) # -- plot row max_rown = max ( rowsID_observed . max ( ) , rowsID_calculated . max ( ) ) scatter_row . plot ( [ 0 , max_rown ] , [ 0 , max_rown ] , "k:" , alpha = 0.5 ) scatter_row . plot ( rowsID_calculated , rowsID_observed , 'b+' ) scatter_row . set_xlim ( [ - 5 , rowsID_calculated . max ( ) + 5 ] ) scatter_row . set_ylim ( [ - 5 , rowsID_observed . max ( ) + 5 ] ) scatter_row . text ( 0.5 , 0.2 , f"Number of Peaks = {npeaks}" , transform = scatter_row . transAxes ) hist_calculated_row . hist ( rowsID_calculated , bins = int ( rowsID_calculated . max ( ) ) , color = 'blue' ) hist_calculated_row . set_xlim ( [ - 5 , rowsID_calculated . max ( ) + 5 ] ) hist_observed_row . hist ( rowsID_observed , bins = int ( rowsID_observed . max ( ) ) , color = 'blue' , orientation = "horizontal" ) hist_observed_row . set_ylim ( [ - 5 , rowsID_observed . max ( ) + 5 ] ) return fig