/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_J0138.0+2247_weekly_bin802
RA = 24.5063, Dec = 22.7962
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='36604470', job_status='RUN', time_executed='2023-12-19 00:02:29.318863', time_epoch_executed='1702972949.32' WHERE source_name='4FGL J0138.0+2247' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36604470

Creating custom pfile directory:
/lscratch/kocevski/36604470/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/36604470/ft1_4FGL_J0138.0+2247_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/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36604470/ft1_4FGL_J0138.0+2247_weekly_bin802.fits outfile=/lscratch/kocevski/36604470/ft1_filteredMKT_4FGL_J0138.0+2247_weekly_bin802.fits ra=24.5063 dec=22.7962 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.42
user 4.06
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_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/36604470/ft1_filteredMKT_4FGL_J0138.0+2247_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_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.42
user 0.20
sys 0.13

Number of photons that the gtmktime cut: 1633

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36604470/ltcube_724032001_724636801_4FGL_J0138.0+2247_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/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits
.....................!
real 24.73
user 24.28
sys 0.21

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36604470/ltcube_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits outfile=/lscratch/kocevski/36604470/expmap_724032001_724636801_4FGL_J0138.0+2247_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/36604470/ltcube_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits
.....................!
real 67.43
user 63.35
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
Added 169 point sources and 0 extended sources

Setting source of interest to:
4FGL J0138.0+2247 @ 24.5063 22.7962

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits outfile=/lscratch/kocevski/36604470/cmap_724032001_724636801_4FGL_J0138.0+2247_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=24.5063 yref=22.7962 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.37
user 0.22
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits outfile=/lscratch/kocevski/36604470/cmap_HighResolution_724032001_724636801_4FGL_J0138.0+2247_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=24.5063 yref=22.7962 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.23
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36604470/Model_4FGL_J0138.0+2247_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/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits.....................!
real 64.14
user 62.70
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits', '/lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits', expMap='/lscratch/kocevski/36604470/expmap_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits', expCube='/lscratch/kocevski/36604470/ltcube_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36604470/Model_4FGL_J0138.0+2247_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0138.0+2247'

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  5.231e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  2.006e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36604470/ft1_filtered_4FGL_J0138.0+2247_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36604470/ft2_4FGL_J0138.0+2247_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36604470/expmap_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36604470/ltcube_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36604470/Model_4FGL_J0138.0+2247_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) = 17684.770438

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    2.5253       1.0000          .0000       .10000E+07
     2 'norm      '    1.0802       1.0000          .0000       .10000E+07
     3 'norm      '    3.2968       1.0000          .0000       .10000E+07
     4 'Prefactor '    8.0866       1.0000          .0000       .10000E+07
     5 'Prefactor '    .65725E-06   1.0000          .0000       .10000E+07
     6 'Prefactor '    .27200E-07   1.0000          .0000       .10000E+07
     7 'Prefactor '    7.2207       1.0000          .0000       .10000E+07
     8 'Prefactor '    16.079       1.0000          .0000       .10000E+07
     9 'norm      '    2.0211       1.0000          .0000       .10000E+07
    10 'Prefactor '    2.2291       1.0000          .0000       .10000E+07
    11 'Prefactor '    .14533E-06   1.0000          .0000       .10000E+07
    12 'norm      '    1.0294       1.0000          .0000       .10000E+07
    13 'Prefactor '    2.6796       1.0000          .0000       .10000E+07
    14 'Prefactor '    28.732       1.0000          .0000       .10000E+07
    15 'Prefactor '    .93192E-06   1.0000          .0000       .10000E+07
    16 'norm      '    20.029       1.0000          .0000       .10000E+07
    17 'Prefactor '    6.3044       1.0000          .0000       .10000E+07
    18 'Prefactor '    .84005E-06   1.0000          .0000       .10000E+07
    19 'Normalizat'    .92527       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0436       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5370E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17684.71     FROM MIGRAD    STATUS=CONVERGED     95 CALLS     1462 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.5275        5.1263       -.56333E-06    .47995E-01
   2  norm          1.0802        .40116        .26016E-07   -.50701E-02
   3  norm          3.2968        .92155        .91193E-07   -.10338E-01
   4  Prefactor     8.0853        4.9778       -.25610E-06   -.94719E-01
   5  Prefactor     .55511E-10    10.275       -.50106E-06** at limit **
   6  Prefactor      .0000        1.2114        .15998E-06** at limit **
   7  Prefactor     7.2201        7.8577        .48573E-07    .23516E-01
   8  Prefactor     16.077        1.0836        .18222E-08   -.21247E-01
   9  norm          2.0210        .48045        .35368E-07   -.12013E-01
  10  Prefactor     2.2294        2.6580       -.12701E-06    .13169E-01
  11  Prefactor      .0000        5.3380        .15651E-06** at limit **
  12  norm          1.0274        1.0467        .15734E-06   -.56302E-02
  13  Prefactor     2.6795        1.7837        .60300E-07   -.11639E-02
  14  Prefactor     28.735        6.0904       -.88722E-07   -.12267E-01
  15  Prefactor      .0000        2.0588       -.12189E-07** at limit **
  16  norm          20.036        1.0028        .36939E-08   -.76366E-02
  17  Prefactor     6.2837        1.0472        .14571E-07   -.17145E-01
  18  Prefactor     .24980E-08    22.910       -.22407E-05** at limit **
  19  Normalizat    .92512        .14843       -.60635E-05    .68295E-04
  20  Prefactor     1.0437        .89143E-01    .33722E-05   -.47259E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.52747
  norm       = 1.08023
  norm       = 3.29678
  Prefactor  = 8.08525
  Prefactor  = 5.55112e-11
  Prefactor  = 0
  Prefactor  = 7.22011
  Prefactor  = 16.0769
  norm       = 2.02102
  Prefactor  = 2.22944
  Prefactor  = 0
  norm       = 1.02739
  Prefactor  = 2.67949
  Prefactor  = 28.7346
  Prefactor  = 0
  norm       = 20.0357
  Prefactor  = 6.28372
  Prefactor  = 2.498e-09
  Normalizat = 0.925121
  Prefactor  = 1.04367
 **********
 **   18 **HESSE 
 **********

 FCN=   17684.71     FROM HESSE     STATUS=OK           341 CALLS     1803 TOTAL
                     EDM=   .16E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.5275        7.4447        .64255E-03   -1.5676    
   2  norm          1.0802        .40431        .11137E-02   -1.5687    
   3  norm          3.2968        .92461        .55735E-03   -1.5672    
   4  Prefactor     8.0853        6.5913        .35233E-03   -1.5651    
   5  Prefactor     .55511E-10    10.289        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor      .0000        1.2160        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     7.2201        8.1410        .37304E-03   -1.5654    
   8  Prefactor     16.077        15.234        .24951E-03   -1.5628    
   9  norm          2.0210        .48302        .72765E-03   -1.5680    
  10  Prefactor     2.2294        6.7654        .68832E-03   -1.5678    
  11  Prefactor      .0000        5.3512        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          1.0274        1.4763        .29366E-02   -1.5688    
  13  Prefactor     2.6795        1.7895        .62223E-03   -1.5675    
  14  Prefactor     28.735        6.4718        .18659E-03   -1.5601    
  15  Prefactor      .0000        2.0580        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          20.036        25.451        .22351E-03   -1.5618    
  17  Prefactor     6.2837        24.847        .39954E-03   -1.5658    
  18  Prefactor     .24980E-08    22.929        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Normalizat    .92512        .13029        .73346E-01   -.95583    
  20  Prefactor     1.0437        .77580E-01    .40302E-01   -.91288    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.56242e-07
Minuit parameter uncertainties:
  1  7.44468
  2  0.404309
  3  0.924609
  4  6.59133
  5  3.98872e-05
  6  1.04442e-05
  7  8.14102
  8  15.234
  9  0.483024
  10  6.76545
  11  1.18313e-05
  12  1.47632
  13  1.78955
  14  6.47185
  15  1.21197e-05
  16  25.4513
  17  24.8475
  18  0.000477193
  19  0.130332
  20  0.0775882
Done.

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

Extracting fit parameters...

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  1.608e+01  1.523e+01  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  2.006e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
534    Prefactor:  1.044e+00  7.759e-02  0.000e+00  1.000e+01 ( 1.000e+00)
535        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
536        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  9.251e-01  1.303e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 4.55
Ra Dec: 24.506 22.796
Photon Index (Fixed Index): 2.01 +/- 0.00
Photon Flux (Fixed Index): 1.25e-08 +/- 1.18e-08
Energy Flux (Fixed Index): 8.48e-06 +/- 8.03e-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) = 17684.54216
delta logL = 0.168233003009

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 17684.5249149
delta logL = 0.185478061761

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    19.403       1.0000          .0000       .10000E+07
     2 'Index     '    1.5885       1.0000          .0000       10.000    
     3 'Normalizat'    .92967       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0434       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5370E+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=   17684.52     FROM MIGRAD    STATUS=CONVERGED     90 CALLS      253 TOTAL
                     EDM=   .73E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     19.410        19.080        .90840E-05    .13216E-02
   2  Index         1.5890        .65612        .14303E-01   -.22001E-04
   3  Normalizat    .92961        .14190        .32386E-03   -.63467E-04
   4  Prefactor     1.0434        .88770E-01    .19097E-03    .74772E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 19.4104
  Index      = 1.58899
  Normalizat = 0.929606
  Prefactor  = 1.04337
 **********
 **   18 **HESSE 
 **********

 FCN=   17684.52     FROM HESSE     STATUS=OK            25 CALLS      278 TOTAL
                     EDM=   .73E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     19.410        19.099        .18168E-05   -1.5620    
   2  Index         1.5890        .65699        .57213E-03   -.75077    
   3  Normalizat    .92961        .14200        .12955E-04   -.95427    
   4  Prefactor     1.0434        .88836E-01    .38194E-04   -.91297    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 7.31468e-11
Minuit parameter uncertainties:
  1  19.0991
  2  0.660582
  3  0.142053
  4  0.0888489
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) = 17684.5249144
delta logL = 0.185478592888

Extracting fit parameters...

4FGL J0138.0+2247
   Spectrum: PowerLaw
257    Prefactor:  1.941e+01  1.910e+01  0.000e+00  1.000e+06 ( 1.000e-14)
258        Index:  1.589e+00  6.606e-01  0.000e+00  1.000e+01 (-1.000e+00)
259        Scale:  2.764e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
534    Prefactor:  1.043e+00  8.885e-02  0.000e+00  1.000e+01 ( 1.000e+00)
535        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
536        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
533   Normalization:  9.296e-01  1.421e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.93
Ra Dec: 24.506 22.796
Photon Index (Free Index): 1.59 +/- 0.66
Photon Flux (Free Index): 6.32e-09 +/- 9.78e-09
Energy Flux (Free Index): 1.48e-05 +/- 2.08e-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/36604470/cmap_HighResolution_724032001_724636801_4FGL_J0138.0+2247_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.25e-08', energy_flux2='1.48e-05', photon_flux_error='1.18e-08', dlogl='1.85e-01', energy_flux='8.48e-06', photon_flux2='6.32e-09', job_status='DONE', time_completed='2023-12-19 00:11:21.065765', photon_index_error2='0.66', photon_index2='1.59', ts='4.55', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='2.08e-05', EG='0.93', time_epoch_completed='1702973481.07', return_code='0', job_id='36604470', GAL2='1.04', EG2='0.93', return_code2='0', energy_flux_error='8.03e-06', photon_flux_error2='9.78e-09', ts2='4.93', photon_index='2.01' WHERE bin_id='802' AND source_name='4FGL J0138.0+2247' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 00:11:21 PST 2023

