;+
; Name: hsi_vis_fwdfit_plot_nofit
; 
; Purpose: Plot the RHESSI VIS_FWDFIT image using the current vf_srcin parameters without fitting.
; 
; Calling arguments:
;  obj - image object
;  
; Output: Plots the image in the plotman instance currently stored in the image object (if none, makes
;  a new one)
;   
; Method: Because an image object may be set up to make a cube (multiple times and/or energies), and
;  we don't want that in this case, we extract the hsi_image_single object, set vf_maxiter to 0 (so
;  no fitting is done), and call getdata. We can't use the image_single plot method because it doesn't
;  work with plotman, so we make a map object, and plot it in the same plotman already being used for
;  the image object (the GUI plotman, if GUI is being used). 
;  At the end we set vf_maxiter back to whatever it was.
;  Note that if the visibilities have not been accumulated yet, on the first plot, all the visibilities for 
;  all times and energies set up in the image cube will be calculated first. Ater first plot, will just use
;  the calculated visibilities.
;   
; Written: 30-Nov-2017, Kim Tolbert
; Modifications:
; 22-Jan-2023, Kim. Added setting the time in the map object (otherwise limb is in the wrong place)
; 
;-
pro hsi_vis_fwdfit_plot_nofit, obj, _extra=_extra

  if hsi_get_alg_name(obj->get(/image_algorithm)) ne 'VIS FWDFIT' then begin
    message, /info, 'Current image algorithm is not VIS FWDFIT.  Aborting'
    return
  endif

  vf_maxiter_save = obj->get(/vf_maxiter)
  xyoffset = obj->get(/xyoffset)
  pixel_size = obj->get(/pixel_size)
  plotman_obj = obj->get_plotman()

  ; use image_single obj, so getdata won't try to make all images in cube
  ; vf_maxiter=0 means don't fit
  obj_single = obj->get(/obj, class='hsi_image_single')
  image = obj_single->getdata(vf_maxiter=0, tb_index=0, eb_index=0)
  img_time = obj_single->get(/absolute_time_range)

  map_obj = obj_new('map')
  map_obj -> set, data=image, $
    xc=xyoffset[0], $
    yc=xyoffset[1], $
    dx=pixel_size[0], $
    dy=pixel_size[1], $
    time=anytim(img_time[0],/tai)

  xtitle = 'Heliocentric X (arcsec)'
  ytitle = 'Heliocentric Y (arcsec)'

  desc = 'VIS_FWDFIT image, NO FIT'  ; this will be name of panel in plotman
  title = desc

  map_obj -> plotman, 0, plotman_obj=plotman_obj, panel_desc=desc, nodup=0, _EXTRA=_extra, $
    xtitle=xtitle, ytitle=ytitle, title=title, $
    status=status, err_msg=err_msg

  obj->set,vf_maxiter=vf_maxiter_save

end