/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 = 17386
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1740.0+4737_weekly_bin801
RA = 265.023, Dec = 47.6198
tmin = 723427201, tmax = 724032001
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='35830917', job_status='RUN', time_executed='2023-12-12 02:06:22.002712', time_epoch_executed='1702375582.0' WHERE source_name='4FGL J1740.0+4737' and cadence='weekly' and bin_id='801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/35830917

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/35830917/ft1_4FGL_J1740.0+4737_weekly_bin801.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/35830917/ft1_4FGL_J1740.0+4737_weekly_bin801.fits outfile=/lscratch/kocevski/35830917/ft1_filteredMKT_4FGL_J1740.0+4737_weekly_bin801.fits ra=265.023 dec=47.6198 rad=12.0 tmin=723427201.0 tmax=724032001.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.80
user 4.52
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.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/35830917/ft1_filteredMKT_4FGL_J1740.0+4737_weekly_bin801.fits evtable="EVENTS" outfile="/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.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.50
user 0.23
sys 0.13

Number of photons that the gtmktime cut: 2659

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/35830917/ltcube_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.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/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits
.....................!
real 30.35
user 29.77
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/35830917/ltcube_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits outfile=/lscratch/kocevski/35830917/expmap_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.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/35830917/ltcube_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits
.....................!
real 75.46
user 70.75
sys 4.19

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
Added 214 point sources and 0 extended sources

Setting source of interest to:
4FGL J1740.0+4737 @ 265.023 47.6198

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits outfile=/lscratch/kocevski/35830917/cmap_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.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=265.023 yref=47.6198 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.94
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits outfile=/lscratch/kocevski/35830917/cmap_HighResolution_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.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=265.023 yref=47.6198 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.78
user 0.24
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/35830917/Model_4FGL_J1740.0+4737_weekly_bin801.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 EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits.....................!
real 91.24
user 88.83
sys 1.06

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits', '/lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits', expMap='/lscratch/kocevski/35830917/expmap_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits', expCube='/lscratch/kocevski/35830917/ltcube_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/35830917/Model_4FGL_J1740.0+4737_weekly_bin801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1740.0+4737'

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  7.827e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/35830917/ft1_filtered_4FGL_J1740.0+4737_weekly_bin801.fits
Spacecraft file(s): /lscratch/kocevski/35830917/ft2_4FGL_J1740.0+4737_weekly_bin801.fits
Exposure map: /lscratch/kocevski/35830917/expmap_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits
Exposure cube: /lscratch/kocevski/35830917/ltcube_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/35830917/Model_4FGL_J1740.0+4737_weekly_bin801.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) = 27990.8786872

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .20434       1.0000          .0000       .10000E+07
     2 'Prefactor '    6.3577       1.0000          .0000       .10000E+07
     3 'Prefactor '    .13817E-06   1.0000          .0000       .10000E+07
     4 'Prefactor '    .45986E-03   1.0000          .0000       .10000E+07
     5 'norm      '    4.7431       1.0000          .0000       .10000E+07
     6 'norm      '    .51766       1.0000          .0000       .10000E+07
     7 'Prefactor '    .72895E-02   1.0000          .0000       .10000E+07
     8 'norm      '    .66536E-01   1.0000          .0000       .10000E+07
     9 'norm      '    3.0497       1.0000          .0000       .10000E+07
    10 'Prefactor '    5.1526       1.0000          .0000       .10000E+07
    11 'norm      '    3.9614       1.0000          .0000       .10000E+07
    12 'Prefactor '    .69206       1.0000          .0000       .10000E+07
    13 'norm      '    1.6550       1.0000          .0000       .10000E+07
    14 'Prefactor '    28.408       1.0000          .0000       .10000E+07
    15 'norm      '    3.6030       1.0000          .0000       .10000E+07
    16 'Prefactor '    23.297       1.0000          .0000       .10000E+07
    17 'Prefactor '    8.6694       1.0000          .0000       .10000E+07
    18 'Prefactor '    29.615       1.0000          .0000       .10000E+07
    19 'Prefactor '    .41388E-02   1.0000          .0000       .10000E+07
    20 'Prefactor '    .78406       1.0000          .0000       .10000E+07
    21 'norm      '    .91296       1.0000          .0000       .10000E+07
    22 'Prefactor '    .18829E-04   1.0000          .0000       .10000E+07
    23 'norm      '    2.8704       1.0000          .0000       .10000E+07
    24 'norm      '    7.0129       1.0000          .0000       .10000E+07
    25 'norm      '    20.591       1.0000          .0000       .10000E+07
    26 'Normalizat'    1.1760       1.0000         .10000E-01   10.000    
    27 'Prefactor '    .91134       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   27990.85     FROM MIGRAD    STATUS=CONVERGED    149 CALLS     2467 TOTAL
                     EDM=   .32E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.9%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .19986        2.8209        .13199E-06** at limit **
   2  Prefactor     6.3579        1.8167       -.40543E-07   -.30229E-02
   3  Prefactor     .61062E-09    4.6509        .14840E-06** at limit **
   4  Prefactor     .30809E-06    7.6134       -.14002E-05** at limit **
   5  norm          4.7436        1.0597        .13212E-07   -.96999E-03
   6  norm          .51821        .40355       -.80392E-07   -.67018E-02
   7  Prefactor     .35466E-06    8.0701       -.20164E-05** at limit **
   8  norm          .66533E-01    .25802        .30333E-07** at limit **
   9  norm          3.0448        3.2333        .44355E-07   -.76647E-04
  10  Prefactor     5.1317        3.8747        .22129E-07    .80053E-03
  11  norm          3.9610        .92456       -.11413E-07   -.10747E-01
  12  Prefactor     .69271        .68922        .46896E-07   -.80491E-03
  13  norm          1.6523        2.1045       -.13329E-06    .80437E-03
  14  Prefactor     28.533        6.2248        .19832E-06   -.34248E-01
  15  norm          3.5984        2.7524        .10190E-06   -.17968E-02
  16  Prefactor     23.298        2.1605        .84470E-07    .26980E-01
  17  Prefactor     8.6815        3.1079        .88113E-07   -.88116E-03
  18  Prefactor     29.443        22.912       -.69250E-06    .11484E-01
  19  Prefactor     .46962E-07    13.915        .49021E-07** at limit **
  20  Prefactor     .78430        4.5607       -.25959E-06   -.81708E-03
  21  norm          .90522        3.0130       -.22694E-06   -.19924E-02
  22  Prefactor     .49960E-09    2.7991       -.22811E-06** at limit **
  23  norm          2.8676        2.3092        .68372E-07   -.32827E-03
  24  norm          7.0459        4.5224        .10868E-06   -.74166E-02
  25  norm          20.591        1.5478        .13248E-07    .64891E-01
  26  Normalizat    1.1761        .12325       -.53196E-05   -.44620E-03
  27  Prefactor     .91136        .82230E-01    .18196E-05   -.44565E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.199855
  Prefactor  = 6.35795
  Prefactor  = 6.10623e-10
  Prefactor  = 3.08087e-07
  norm       = 4.74361
  norm       = 0.51821
  Prefactor  = 3.54661e-07
  norm       = 0.0665333
  norm       = 3.04482
  Prefactor  = 5.13171
  norm       = 3.961
  Prefactor  = 0.692705
  norm       = 1.65228
  Prefactor  = 28.5335
  norm       = 3.59838
  Prefactor  = 23.298
  Prefactor  = 8.68151
  Prefactor  = 29.4427
  Prefactor  = 4.69624e-08
  Prefactor  = 0.784295
  norm       = 0.905218
  Prefactor  = 4.996e-10
  norm       = 2.86757
  norm       = 7.04585
  norm       = 20.5907
  Normalizat = 1.17605
  Prefactor  = 0.911359
 **********
 **   18 **HESSE 
 **********

 FCN=   27990.85     FROM HESSE     STATUS=OK           578 CALLS     3045 TOTAL
                     EDM=   .14E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .19986        .64518        .65647E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     6.3579        1.8286        .39784E-03   -1.5658    
   3  Prefactor     .61062E-09    .48290        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .30809E-06    12.661        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          4.7436        1.0617        .46177E-03   -1.5664    
   6  norm          .51821        .42061        .76953E-03   -1.5694    
   7  Prefactor     .35466E-06    1.2376        .58772E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .66533E-01    .17434        .21498E-02   -1.5713    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  norm          3.0448        3.2656        .58071E-03   -1.5673    
  10  Prefactor     5.1317        3.8833        .44265E-03   -1.5663    
  11  norm          3.9610        .93015        .50655E-03   -1.5668    
  12  Prefactor     .69271        .67922        .61356E-03   -1.5691    
  13  norm          1.6523        2.2792        .82010E-03   -1.5682    
  14  Prefactor     28.533        33.782        .18765E-03   -1.5601    
  15  norm          3.5984        2.7807        .53208E-03   -1.5670    
  16  Prefactor     23.298        16.648        .20723E-03   -1.5611    
  17  Prefactor     8.6815        3.1338        .34020E-03   -1.5649    
  18  Prefactor     29.443        24.951        .18379E-03   -1.5599    
  19  Prefactor     .46962E-07    14.712        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .78430        4.6390        .54131E-03   -1.5690    
  21  norm          .90522        3.0337        .44868E-03   -1.5689    
  22  Prefactor     .49960E-09    2.7950        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          2.8676        2.3125        .59971E-03   -1.5674    
  24  norm          7.0459        4.7147        .37859E-03   -1.5655    
  25  norm          20.591        6.5896        .22044E-03   -1.5617    
  26  Normalizat    1.1761        .10547        .64154E-01   -.87346    
  27  Prefactor     .91136        .69194E-01    .45149E-01   -.95745    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.39735e-06
Minuit parameter uncertainties:
  1  0.645178
  2  1.8286
  3  3.43571e-05
  4  0.00394997
  5  1.06175
  6  0.420609
  7  0.00132498
  8  0.174342
  9  3.26556
  10  3.88326
  11  0.930148
  12  0.679215
  13  2.27915
  14  33.7818
  15  2.78068
  16  16.648
  17  3.13375
  18  24.9514
  19  0.00166193
  20  3.81491
  21  3.03373
  22  7.63804e-05
  23  2.31248
  24  4.71474
  25  6.58959
  26  0.105488
  27  0.069201
Done.

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

Extracting fit parameters...

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  2.330e+01  1.665e+01  0.000e+00  1.000e+06 ( 1.000e-14)
359        Index:  2.090e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  9.114e-01  6.920e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.176e+00  1.055e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.95
Ra Dec: 265.023 47.620
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 1.34e-08 +/- 9.55e-09
Energy Flux (Fixed Index): 7.51e-06 +/- 5.36e-06

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) = 27990.3034451
delta logL = 0.548334179774

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 27990.2876525
delta logL = 0.564126761336

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    29.863       1.0000          .0000       .10000E+07
     2 'Index     '    1.5918       1.0000          .0000       10.000    
     3 'Normalizat'    1.1828       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .90949       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   27990.29     FROM MIGRAD    STATUS=CONVERGED     84 CALLS      278 TOTAL
                     EDM=   .15E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     29.863        21.792        .73208E-05    .17790E-02
   2  Index         1.5917        .45788        .13672E-01    .74458E-04
   3  Normalizat    1.1828        .11740        .28311E-03   -.55417E-04
   4  Prefactor     .90949        .81251E-01    .21903E-03   -.76818E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 29.8629
  Index      = 1.59171
  Normalizat = 1.18276
  Prefactor  = 0.909488
 **********
 **   18 **HESSE 
 **********

 FCN=   27990.29     FROM HESSE     STATUS=OK            23 CALLS      301 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     29.863        21.904        .14642E-05   -1.5599    
   2  Index         1.5917        .46042        .54688E-03   -.75003    
   3  Normalizat    1.1828        .11752        .11324E-04   -.87137    
   4  Prefactor     .90949        .81342E-01    .87613E-05   -.95810    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.55172e-10
Minuit parameter uncertainties:
  1  21.9037
  2  0.461646
  3  0.117547
  4  0.0813524
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) = 27990.2876525
delta logL = 0.564126769226

Extracting fit parameters...

4FGL J1740.0+4737
   Spectrum: PowerLaw
358    Prefactor:  2.986e+01  2.190e+01  0.000e+00  1.000e+06 ( 1.000e-14)
359        Index:  1.592e+00  4.616e-01  0.000e+00  1.000e+01 (-1.000e+00)
360        Scale:  2.179e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  9.095e-01  8.135e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.183e+00  1.175e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.08
Ra Dec: 265.023 47.620
Photon Index (Free Index): 1.59 +/- 0.46
Photon Flux (Free Index): 6.69e-09 +/- 7.22e-09
Energy Flux (Free Index): 1.56e-05 +/- 1.61e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/35830917/cmap_HighResolution_723427201_724032001_4FGL_J1740.0+4737_weekly_bin801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.34e-08', energy_flux2='1.56e-05', photon_flux_error='9.55e-09', dlogl='5.64e-01', energy_flux='7.51e-06', photon_flux2='6.69e-09', job_status='DONE', time_completed='2023-12-12 02:23:06.732590', photon_index_error2='0.46', photon_index2='1.59', ts='4.95', fit_tolerance='1e-08', GAL='0.91', photon_index_error='0.00', energy_flux_error2='1.61e-05', EG='1.18', time_epoch_completed='1702376586.73', return_code='0', job_id='35830917', GAL2='0.91', EG2='1.18', return_code2='0', energy_flux_error='5.36e-06', photon_flux_error2='7.22e-09', ts2='6.08', photon_index='2.09' WHERE bin_id='801' AND source_name='4FGL J1740.0+4737' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 12 02:23:06 PST 2023

