/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/pyfits/__init__.py:22: PyFITSDeprecationWarning: PyFITS is deprecated, please use astropy.io.fits
  PyFITSDeprecationWarning)  # noqa

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

number of points = 17422
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1935.2+2029_weekly_bin802
RA = 293.818, Dec = 20.4908
tmin = 724032001, tmax = 724636801
emin = 100.0, emax = 100000.0
irfs = P8R3_SOURCE_V2
ROI = 12
zmax = 90

Fitting strategies:
Fix sources to their catalog values = True
Leave variable source normalizations free = True
Perform pre-fit where ALL sources are frozen to catalog values = False
Perform secondary fit with a free spectral index = True
Remove all catalog sources = False
Remove weak (TS < 2) catalog sources = False
Freeze Galactic component = False

Likelihood fit parameters:
Statistic: UNBINNED
Optimizer: MINUIT

Catalog: 4FGL

Repository job = True

LAT data source:
Data catalog

Updating database...

UPDATE lightcurve_data_v2 SET job_id='36607640', job_status='RUN', time_executed='2023-12-19 01:15:54.044456', time_epoch_executed='1702977354.04' WHERE source_name='4FGL J1935.2+2029' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36607640

Creating custom pfile directory:
/lscratch/kocevski/36607640/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36607640/ft1_4FGL_J1935.2+2029_weekly_bin802.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=724032001.0 && nMetStart<724636801.0' /Data/Flight/Level1/LPA

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36607640/ft1_4FGL_J1935.2+2029_weekly_bin802.fits outfile=/lscratch/kocevski/36607640/ft1_filteredMKT_4FGL_J1935.2+2029_weekly_bin802.fits ra=293.818 dec=20.4908 rad=12.0 tmin=724032001.0 tmax=724636801.0 emin=100.0 emax=100000.0 zmin=0.0 zmax=90.0 evclass=128 evtype="INDEF" convtype=-1 phasemin=0.0 phasemax=1.0 evtable="EVENTS" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Done.
real 4.84
user 4.22
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/36607640/ft1_filteredMKT_4FGL_J1935.2+2029_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits" apply_filter=yes overwrite=yes header_obstimes=yes tstart=0.0 tstop=0.0 gtifile="default" chatter=3 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtmktime version HEAD
Applying GTI filter:
IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.53
user 0.21
sys 0.14

Number of photons that the gtmktime cut: 10344

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36607640/ltcube_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits dcostheta=0.025 binsz=1.0 phibins=0 tmin=0.0 tmax=0.0 file_version="1" zmin=0.0 zmax=90.0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Working on file /lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits
.....................!
real 24.96
user 24.49
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36607640/ltcube_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits outfile=/lscratch/kocevski/36607640/expmap_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits irfs="P8R3_SOURCE_V2" evtype="INDEF" srcrad=30.0 nlong=88 nlat=88 nenergies=10 submap=no nlongmin=0 nlongmax=0 nlatmin=0 nlatmax=0 chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

The exposure maps generated by this tool are meant
to be used for *unbinned* likelihood analysis only.
Do not use them for binned analyses.
Computing the ExposureMap using /lscratch/kocevski/36607640/ltcube_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits
.....................!
real 68.29
user 64.15
sys 3.82

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source W 51C in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W51C.fits is the correct path to the extended template.
Extended source G42.8+0.6 in ROI with RadialDisk spatial model.
Extended source W 44 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/W44.fits is the correct path to the extended template.
Extended source HESS J1857+026 in ROI with RadialDisk spatial model.
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 278 point sources and 5 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1935.2+2029 @ 293.818 20.4908

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits outfile=/lscratch/kocevski/36607640/cmap_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=293.818 yref=20.4908 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.41
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits outfile=/lscratch/kocevski/36607640/cmap_HighResolution_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=293.818 yref=20.4908 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

This is gtbin version HEAD
real 0.40
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36607640/Model_4FGL_J1935.2+2029_weekly_bin802.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source Cygnus Loop
adding source EG_v02
adding source G42.8+0.6
adding source GAL_V02
adding source HESS J1857+026
adding source W 44
adding source W 51C
Working on...
/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits.....................!
real 1239.58
user 1233.31
sys 1.18

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits', '/lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits', expMap='/lscratch/kocevski/36607640/expmap_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits', expCube='/lscratch/kocevski/36607640/ltcube_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36607640/Model_4FGL_J1935.2+2029_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1935.2+2029'

4FGL J1935.2+2029
   Spectrum: PLSuperExpCutoff2
577    Prefactor:  1.362e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-11)
578       Index1:  1.389e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
579        Scale:  1.411e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
580    Expfactor:  1.546e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
581       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36607640/ft1_filtered_4FGL_J1935.2+2029_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36607640/ft2_4FGL_J1935.2+2029_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36607640/expmap_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36607640/ltcube_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36607640/Model_4FGL_J1935.2+2029_weekly_bin802.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 91245.665475

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 91245.1215361

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .82760E-02   1.0000          .0000       .10000E+07
     2 'Prefactor '    .72576E-05   1.0000          .0000       .10000E+07
     3 'norm      '    3.2387       1.0000          .0000       .10000E+07
     4 'norm      '    .22553E-01   1.0000          .0000       .10000E+07
     5 'Prefactor '    2.2659       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .85130       1.0000          .0000       .10000E+07
     7 'Prefactor '    7.0961       1.0000          .0000       .10000E+07
     8 'Prefactor '    .18845E-01   1.0000          .0000       .10000E+07
     9 'norm      '    .28537E-03   1.0000          .0000       .10000E+07
    10 'Normalizat'    1.2496       1.0000         .10000E-01   10.000    
    11 'Prefactor '    .99559       1.0000          .0000       10.000    
    12 'norm      '    7.2380       1.0000          .0000       .10000E+07
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1027E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   91245.12     FROM MIGRAD    STATUS=CONVERGED    109 CALLS      675 TOTAL
                     EDM=   .61E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        18.001        .30536E-06** at limit **
   2  Prefactor     .55511E-10    2.5600       -.33022E-06** at limit **
   3  norm          4.0312        14.476        .89415E-06   -.47922E-03
   4  norm          .10658        13.111       -.13768E-05** at limit **
   5  Prefactor     2.2719        1.7692       -.34354E-06    .16716E-03
   6  Prefactor     .84878        1.4705        .48787E-07   -.80412E-03
   7  Prefactor     7.0809        20.037        .70620E-06   -.75849E-05
   8  Prefactor     .55511E-10    34.457       -.10469E-05** at limit **
   9  norm           .0000        14.386        .11585E-05** at limit **
  10  Normalizat    1.2503        .20676        .54317E-05   -.14634E-04
  11  Prefactor     .99547        .17233E-01   -.50568E-06    .37840E-03
  12  norm          7.2282        1.4790       -.48222E-07    .24125E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  norm       = 4.03121
  norm       = 0.106579
  Prefactor  = 2.27189
  Prefactor  = 0.848776
  Prefactor  = 7.08087
  Prefactor  = 5.55112e-11
  norm       = 0
  Normalizat = 1.25026
  Prefactor  = 0.995471
  norm       = 7.2282
 **********
 **   18 **HESSE 
 **********

 FCN=   91245.12     FROM HESSE     STATUS=OK           169 CALLS      844 TOTAL
                     EDM=   .37E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        18.116        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .55511E-10    2.5593        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          4.0312        14.620        .56259E-03   -1.5668    
   4  norm          .10658        .90123        .11384E-01   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     2.2719        1.7817        .68215E-02   -1.5407    
   6  Prefactor     .84878        1.4746        .49187E-03   -1.5690    
   7  Prefactor     7.0809        20.325        .37634E-03   -1.5655    
   8  Prefactor     .55511E-10    33.335        .17114E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm           .0000        .57699        .82030E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Normalizat    1.2503        .21588        .28916       -.85064    
  11  Prefactor     .99547        .17503E-01    .25506E-01   -.92881    
  12  norm          7.2282        1.4779        .37260E-03   -1.5654    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.67887e-07
Minuit parameter uncertainties:
  1  8.7991e-06
  2  2.14629e-05
  3  14.62
  4  0.619846
  5  1.78172
  6  1.47457
  7  20.3247
  8  8.7898e-05
  9  1.308e-06
  10  0.216031
  11  0.0175033
  12  1.47787
Done.

MINUIT Return Code (Fixed Index): 0
logL (Fixed Index) = 91245.118884

Extracting fit parameters...

4FGL J1935.2+2029
   Spectrum: PLSuperExpCutoff2
577    Prefactor:  2.272e+00  1.782e+00  1.000e-04  1.000e+04 ( 1.000e-11)
578       Index1:  1.389e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
579        Scale:  1.411e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
580    Expfactor:  1.546e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
581       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1013    Prefactor:  9.955e-01  1.750e-02  0.000e+00  1.000e+01 ( 1.000e+00)
1014        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1015        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1009   Normalization:  1.250e+00  2.160e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.90
Ra Dec: 293.818 20.491
Photon Index (Fixed Index): 1.39 +/- 0.00
Photon Flux (Fixed Index): 7.49e-08 +/- 5.87e-08
Energy Flux (Fixed Index): 2.63e-05 +/- 2.07e-05

TS (Fixed Index): 1.90
Ra Dec: 293.818 20.491
Photon Flux Upper Limit: 1.81718998203e-07 ph cm-2 s-1
Energy Flux Upper Limit: 6.39073889622e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/36607640/likelihoodResults_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91244.5246857
delta logL = 0.594198350285

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91244.5226557
delta logL = 0.596228270646

Fit tolerance = 1e-08

Performing likelihood fit...
 **********
 **   14 **SET NOWARN 
 **********

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.4957       1.0000         .10000E-03   10000.    
     2 'Index1    '    1.9331       1.0000          .0000       10.000    
     3 'Normalizat'    1.2410       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .99380       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .1027E+06   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   91244.52     FROM MIGRAD    STATUS=FAILED       101 CALLS      301 TOTAL
                     EDM=   .78E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4937        2.4796        .20638E-03    .30848E-04
   2  Index1        1.9335        .83710        .12187E-01    .41246E-02
   3  Normalizat    1.2411        .20544        .13014E-02    .40535E-05
   4  Prefactor     .99382        .16763E-01    .11280E-03    .61280E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   91244.52     FROM SIMPLEX   STATUS=UNCHANGED     84 CALLS      385 TOTAL
                     EDM=   .14E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.4937        2.4796        .53888E-04   -1.5464    
   2  Index1        1.9335        .83710        .49953E-03   -.66023    
   3  Normalizat    1.2411        .20544        .20683E-03   -.85343    
   4  Prefactor     .99382        .16763E-01    .22656E-04   -.92936    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   91244.52     FROM MIGRAD    STATUS=CONVERGED     28 CALLS      413 TOTAL
                     EDM=   .45E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.4937        1.5163        .82552E-05    .88138E-05
   2  Index1        1.9335        .51441        .24375E-02    .16330E-03
   3  Normalizat    1.2411        .20375        .52054E-04    .34944E-05
   4  Prefactor     .99382        .16679E-01    .45119E-05    .64505E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.49365
  Index1     = 1.93352
  Normalizat = 1.24106
  Prefactor  = 0.993817
 **********
 **   18 **HESSE 
 **********

 FCN=   91244.52     FROM HESSE     STATUS=OK            25 CALLS      438 TOTAL
                     EDM=   .21E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.4937        1.4489        .16510E-05   -1.5464    
   2  Index1        1.9335        .49145        .48749E-03   -.66023    
   3  Normalizat    1.2411        .20363        .10411E-04   -.85343    
   4  Prefactor     .99382        .16677E-01    .90238E-06   -.92936    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.14879e-13
Minuit parameter uncertainties:
  1  1.44898
  2  0.492726
  3  0.203761
  4  0.0166769
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 91244.5226536
delta logL = 0.5962304227

Extracting fit parameters...

4FGL J1935.2+2029
   Spectrum: PLSuperExpCutoff2
577    Prefactor:  1.494e+00  1.449e+00  1.000e-04  1.000e+04 ( 1.000e-11)
578       Index1:  1.934e+00  4.927e-01  0.000e+00  1.000e+01 (-1.000e+00)
579        Scale:  1.411e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed
580    Expfactor:  1.546e+01  0.000e+00 -1.000e+00  1.000e+02 ( 1.000e-03) fixed
581       Index2:  6.667e-01  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
1013    Prefactor:  9.938e-01  1.668e-02  0.000e+00  1.000e+01 ( 1.000e+00)
1014        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
1015        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
1009   Normalization:  1.241e+00  2.038e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.08
Ra Dec: 293.818 20.491
Photon Index (Free Index): 1.93 +/- 0.49
Photon Flux (Free Index): 1.36e-07 +/- 8.60e-08
Energy Flux (Free Index): 3.35e-05 +/- 2.01e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /lscratch/kocevski/36607640/cmap_HighResolution_724032001_724636801_4FGL_J1935.2+2029_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='6.39e-05', comment='SUCCESS', photon_flux='7.49e-08', energy_flux2='3.35e-05', photon_flux_error='5.87e-08', dlogl='5.96e-01', energy_flux='2.63e-05', photon_flux2='1.36e-07', job_status='DONE', time_completed='2023-12-19 02:07:11.678752', photon_index_error2='0.49', photon_index2='1.93', ts='1.90', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', photon_flux_upper_limit='1.82e-07', energy_flux_error2='2.01e-05', EG='1.25', time_epoch_completed='1702980431.68', return_code='0', job_id='36607640', GAL2='0.99', EG2='1.24', return_code2='0', energy_flux_error='2.07e-05', photon_flux_error2='8.60e-08', ts2='3.08', photon_index='1.39' WHERE bin_id='802' AND source_name='4FGL J1935.2+2029' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 02:07:11 PST 2023

