/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_J1724.2+4005_weekly_bin802
RA = 261.051, Dec = 40.0891
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='36607218', job_status='RUN', time_executed='2023-12-19 01:05:56.064917', time_epoch_executed='1702976756.06' WHERE source_name='4FGL J1724.2+4005' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36607218

Creating custom pfile directory:
/lscratch/kocevski/36607218/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/36607218/ft1_4FGL_J1724.2+4005_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/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36607218/ft1_4FGL_J1724.2+4005_weekly_bin802.fits outfile=/lscratch/kocevski/36607218/ft1_filteredMKT_4FGL_J1724.2+4005_weekly_bin802.fits ra=261.051 dec=40.0891 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.77
user 4.44
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_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/36607218/ft1_filteredMKT_4FGL_J1724.2+4005_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_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.62
user 0.24
sys 0.15

Number of photons that the gtmktime cut: 1782

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36607218/ltcube_724032001_724636801_4FGL_J1724.2+4005_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/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits
.....................!
real 32.86
user 32.10
sys 0.30

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36607218/ltcube_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits outfile=/lscratch/kocevski/36607218/expmap_724032001_724636801_4FGL_J1724.2+4005_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/36607218/ltcube_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits
.....................!
real 69.37
user 65.20
sys 3.73

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

Setting source of interest to:
4FGL J1724.2+4005 @ 261.051 40.0891

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits outfile=/lscratch/kocevski/36607218/cmap_724032001_724636801_4FGL_J1724.2+4005_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=261.051 yref=40.0891 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.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits outfile=/lscratch/kocevski/36607218/cmap_HighResolution_724032001_724636801_4FGL_J1724.2+4005_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=261.051 yref=40.0891 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.49
user 0.25
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36607218/Model_4FGL_J1724.2+4005_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 EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits.....................!
real 55.50
user 53.92
sys 1.24

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits', '/lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits', expMap='/lscratch/kocevski/36607218/expmap_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits', expCube='/lscratch/kocevski/36607218/ltcube_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36607218/Model_4FGL_J1724.2+4005_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1724.2+4005'

4FGL J1724.2+4005
   Spectrum: LogParabola
330         norm:  4.785e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
331        alpha:  2.332e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
332         beta:  1.393e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
333           Eb:  5.866e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36607218/ft1_filtered_4FGL_J1724.2+4005_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36607218/ft2_4FGL_J1724.2+4005_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36607218/expmap_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36607218/ltcube_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36607218/Model_4FGL_J1724.2+4005_weekly_bin802.xml
Optimizer: MINUIT
Statistic: UNBINNED

Performing an iterative likelihood fit...

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Fixed Index): 102
logL (Fixed Index) = 18696.1688267

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .12434E-07   1.0000          .0000       .10000E+07
     2 'norm      '    .37036       1.0000          .0000       .10000E+07
     3 'norm      '    .55511E-10   1.0000          .0000       .10000E+07
     4 'Prefactor '    .80513E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '    .62414       1.0000          .0000       .10000E+07
     6 'norm      '    2.0203       1.0000          .0000       .10000E+07
     7 'Prefactor '    .79523       1.0000          .0000       .10000E+07
     8 'Prefactor '    2.9507       1.0000          .0000       .10000E+07
     9 'Prefactor '    8.0995       1.0000          .0000       .10000E+07
    10 'Prefactor '    .90206E-06   1.0000          .0000       .10000E+07
    11 'norm      '    2.6799       1.0000          .0000       .10000E+07
    12 'norm      '    .26841       1.0000          .0000       .10000E+07
    13 'Prefactor '    .21103E-04   1.0000          .0000       .10000E+07
    14 'norm      '    .21883       1.0000          .0000       .10000E+07
    15 'norm      '    8.1183       1.0000          .0000       .10000E+07
    16 'norm      '    2.3125       1.0000          .0000       .10000E+07
    17 'Prefactor '    4.9158       1.0000          .0000       .10000E+07
    18 'norm      '    .59730E-07   1.0000          .0000       .10000E+07
    19 'Prefactor '    5.1066       1.0000          .0000       .10000E+07
    20 'Prefactor '    .98302E-02   1.0000          .0000       .10000E+07
    21 'norm      '    .17327E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    .63393E-04   1.0000          .0000       .10000E+07
    23 'Prefactor '    .28366E-03   1.0000          .0000       .10000E+07
    24 'Prefactor '    7.6946       1.0000          .0000       .10000E+07
    25 'norm      '    .82871       1.0000          .0000       .10000E+07
    26 'norm      '    4.9886       1.0000          .0000       .10000E+07
    27 'norm      '    1.2905       1.0000          .0000       .10000E+07
    28 'Prefactor '    9.7419       1.0000          .0000       .10000E+07
    29 'Normalizat'    1.3753       1.0000         .10000E-01   10.000    
    30 'Prefactor '    .77070       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7040E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   18695.15     FROM MIGRAD    STATUS=CONVERGED    196 CALLS     2292 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.0%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .82395       -.12230E-06** at limit **
   2  norm          .37034        .92895E-01    .85551E-08    .13538E-01
   3  norm           .0000        6.0819       -.41592E-06** at limit **
   4  Prefactor      .0000        11.246        .16003E-05** at limit **
   5  Prefactor     .65752        2.1046        .23117E-06    .12278E-03
   6  norm          .68127        150.79        .27311E-05   -.39186E-02
   7  Prefactor     .80252        1.3604        .16375E-06   -.88675E-03
   8  Prefactor     2.9566        1.3743       -.21789E-07   -.31608E-02
   9  Prefactor     8.0914        2.6346       -.11560E-06   -.27813E-02
  10  Prefactor      .0000        .90860       -.24962E-07** at limit **
  11  norm          2.6788        1.0577       -.45613E-07   -.65924E-03
  12  norm          .26782        .36868        .34615E-07    .14902E-02
  13  Prefactor      .0000        6.8037        .14522E-06** at limit **
  14  norm          .21859        .33991        .26801E-08** at limit **
  15  norm          8.1252        4.5230       -.25397E-08    .16249E-03
  16  norm          2.3111        1.2091       -.67051E-07   -.25980E-02
  17  Prefactor     4.9148        2.2752        .13439E-07    .11480E-02
  18  norm           .0000        .89366       -.12657E-06** at limit **
  19  Prefactor     4.5987        30.987        .11355E-05    .76257E-02
  20  Prefactor     .55511E-09    30.243        .20630E-06** at limit **
  21  norm           .0000        2.9154        .15477E-06** at limit **
  22  Prefactor     .55511E-10    19.858       -.69170E-06** at limit **
  23  Prefactor     .55511E-10    10.931       -.85249E-07** at limit **
  24  Prefactor     7.6506        5.7111        .73355E-07   -.52987E-04
  25  norm          .82831        .71354        .89545E-07    .12564E-02
  26  norm          4.8911        1.1443       -.78935E-08    .29970E-02
  27  norm          1.2640        4.1947       -.82974E-06   -.60262E-03
  28  Prefactor     9.7346        4.0815        .24322E-06    .18430E-02
  29  Normalizat    1.3755        .15736       -.22017E-05   -.46470E-05
  30  Prefactor     .77094        .10207        .85824E-06   -.13982E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  norm       = 0.370341
  norm       = 0
  Prefactor  = 0
  Prefactor  = 0.657523
  norm       = 0.681274
  Prefactor  = 0.802521
  Prefactor  = 2.95656
  Prefactor  = 8.09138
  Prefactor  = 0
  norm       = 2.67885
  norm       = 0.267819
  Prefactor  = 0
  norm       = 0.218587
  norm       = 8.12523
  norm       = 2.31108
  Prefactor  = 4.91477
  norm       = 0
  Prefactor  = 4.59872
  Prefactor  = 5.55112e-10
  norm       = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 5.55112e-11
  Prefactor  = 7.6506
  norm       = 0.828314
  norm       = 4.89108
  norm       = 1.26396
  Prefactor  = 9.73463
  Normalizat = 1.37554
  Prefactor  = 0.770936
 **********
 **   18 **HESSE 
 **********

 FCN=   18695.15     FROM HESSE     STATUS=OK           656 CALLS     2948 TOTAL
                     EDM=   .77E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .82112        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          .37034        .94596E-01    .42970E-03   -1.5696    
   3  norm           .0000        6.1076        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor      .0000        11.223        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .65752        2.1114        .67093E-03   -1.5692    
   6  norm          .68127        249.39        .72781E-03   -1.5691    
   7  Prefactor     .80252        1.4605        .53291E-03   -1.5690    
   8  Prefactor     2.9566        1.4317        .59096E-03   -1.5674    
   9  Prefactor     8.0914        2.6850        .35205E-03   -1.5651    
  10  Prefactor      .0000        .90250        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          2.6788        1.0591        .62219E-04   -1.5675    
  12  norm          .26782        .41793        .22775E-02   -1.5698    
  13  Prefactor      .0000        6.7009        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .21859        .33791        .22609E-02   -1.5699    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          8.1252        4.5629        .35164E-03   -1.5651    
  16  norm          2.3111        1.2176        .67439E-03   -1.5678    
  17  Prefactor     4.9148        2.2779        .45341E-03   -1.5664    
  18  norm           .0000        .89773        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     4.5987        86.179        .44468E-03   -1.5665    
  20  Prefactor     .55511E-09    30.644        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm           .0000        2.9003        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .55511E-10    19.901        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .55511E-10    10.913        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     7.6506        5.7396        .36127E-03   -1.5653    
  25  norm          .82831        .71107        .50819E-03   -1.5690    
  26  norm          4.8911        35.006        .45001E-03   -1.5664    
  27  norm          1.2640        4.2248        .97444E-03   -1.5685    
  28  Prefactor     9.7346        4.1015        .32082E-03   -1.5646    
  29  Normalizat    1.3755        .13174        .60348E-01   -.81339    
  30  Prefactor     .77094        .84901E-01    .43335E-01   -1.0081    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.65797e-06
Minuit parameter uncertainties:
  1  1.82009e-06
  2  0.0945959
  3  2.71765e-06
  4  2.35169e-05
  5  2.11135
  6  26.0703
  7  1.46054
  8  1.43167
  9  2.68501
  10  2.80624e-06
  11  1.0591
  12  0.417926
  13  8.71887e-06
  14  0.337911
  15  4.56294
  16  1.21763
  17  2.27787
  18  1.2573e-06
  19  39.8159
  20  0.000256087
  21  4.91972e-06
  22  6.09118e-05
  23  4.91906e-05
  24  5.73956
  25  0.711073
  26  26.1702
  27  4.22479
  28  4.10148
  29  0.131775
  30  0.0849157
Done.

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

Extracting fit parameters...

4FGL J1724.2+4005
   Spectrum: LogParabola
330         norm:  8.125e+00  4.563e+00  0.000e+00  1.000e+06 ( 1.000e-12)
331        alpha:  2.332e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
332         beta:  1.393e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
333           Eb:  5.866e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
701    Prefactor:  7.709e-01  8.492e-02  0.000e+00  1.000e+01 ( 1.000e+00)
702        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
703        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
700   Normalization:  1.376e+00  1.318e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 6.80
Ra Dec: 261.051 40.089
Photon Index (Fixed Index): 2.33 +/- 0.00
Photon Flux (Fixed Index): 3.06e-08 +/- 1.72e-08
Energy Flux (Fixed Index): 1.00e-05 +/- 5.63e-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) = 18694.3819877
delta logL = 0.764833775029

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 18694.3497004
delta logL = 0.797121140062

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    7.2861       1.0000          .0000       .10000E+07
     2 'alpha     '    1.6815       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3918       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .76539       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7040E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   18694.35     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      218 TOTAL
                     EDM=   .91E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          7.2852        4.2831        .37135E-03    .15432E-01
   2  alpha         1.6814        .38104        .44359       -.86440E-04
   3  Normalizat    1.3918        .12232        .60046E-01    .11347E-03
   4  Prefactor     .76537        .83413E-01    .43265E-01    .64730E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 7.28521
  alpha      = 1.68137
  Normalizat = 1.39185
  Prefactor  = 0.765368
 **********
 **   18 **HESSE 
 **********

 FCN=   18694.35     FROM HESSE     STATUS=OK            33 CALLS      251 TOTAL
                     EDM=   .41E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          7.2852        4.8526        .74270E-04   -1.5654    
   2  alpha         1.6814        .49219        .21291E-01   -.33360    
   3  Normalizat    1.3918        .14554        .26556E-03   -.80865    
   4  Prefactor     .76537        .99298E-01    .23512E-03   -1.0102    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 4.12071e-11
Minuit parameter uncertainties:
  1  4.85264
  2  0.495827
  3  0.145583
  4  0.0993206
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) = 18694.3497002
delta logL = 0.797121255

Extracting fit parameters...

4FGL J1724.2+4005
   Spectrum: LogParabola
330         norm:  7.285e+00  4.853e+00  0.000e+00  1.000e+06 ( 1.000e-12)
331        alpha:  1.681e+00  4.958e-01  0.000e+00  5.000e+00 ( 1.000e+00)
332         beta:  1.393e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
333           Eb:  5.866e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
701    Prefactor:  7.654e-01  9.932e-02  0.000e+00  1.000e+01 ( 1.000e+00)
702        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
703        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
700   Normalization:  1.392e+00  1.456e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.39
Ra Dec: 261.051 40.089
Photon Index (Free Index): 1.68 +/- 0.50
Photon Flux (Free Index): 1.68e-08 +/- 1.36e-08
Energy Flux (Free Index): 1.31e-05 +/- 8.73e-06

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/36607218/cmap_HighResolution_724032001_724636801_4FGL_J1724.2+4005_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.06e-08', energy_flux2='1.31e-05', photon_flux_error='1.72e-08', dlogl='7.97e-01', energy_flux='1.00e-05', photon_flux2='1.68e-08', job_status='DONE', time_completed='2023-12-19 01:18:28.426671', photon_index_error2='0.50', photon_index2='1.68', ts='6.80', fit_tolerance='1e-08', GAL='0.77', photon_index_error='0.00', energy_flux_error2='8.73e-06', EG='1.38', time_epoch_completed='1702977508.43', return_code='0', job_id='36607218', GAL2='0.77', EG2='1.39', return_code2='0', energy_flux_error='5.63e-06', photon_flux_error2='1.36e-08', ts2='8.39', photon_index='2.33' WHERE bin_id='802' AND source_name='4FGL J1724.2+4005' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 01:18:28 PST 2023

