/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_J1436.9+5638_weekly_bin801
RA = 219.229, Dec = 56.649
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='35830278', job_status='RUN', time_executed='2023-12-12 01:55:56.408619', time_epoch_executed='1702374956.41' WHERE source_name='4FGL J1436.9+5638' and cadence='weekly' and bin_id='801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/35830278

Creating custom pfile directory:
/lscratch/kocevski/35830278/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/35830278/ft1_4FGL_J1436.9+5638_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/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/35830278/ft1_4FGL_J1436.9+5638_weekly_bin801.fits outfile=/lscratch/kocevski/35830278/ft1_filteredMKT_4FGL_J1436.9+5638_weekly_bin801.fits ra=219.229 dec=56.649 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.44
user 4.17
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_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/35830278/ft1_filteredMKT_4FGL_J1436.9+5638_weekly_bin801.fits evtable="EVENTS" outfile="/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_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.39
user 0.22
sys 0.13

Number of photons that the gtmktime cut: 1879

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/35830278/ltcube_723427201_724032001_4FGL_J1436.9+5638_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/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits
.....................!
real 17.75
user 17.33
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/35830278/ltcube_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits outfile=/lscratch/kocevski/35830278/expmap_723427201_724032001_4FGL_J1436.9+5638_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/35830278/ltcube_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits
.....................!
real 62.66
user 58.92
sys 3.32

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

Setting source of interest to:
4FGL J1436.9+5638 @ 219.229 56.649

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits outfile=/lscratch/kocevski/35830278/cmap_723427201_724032001_4FGL_J1436.9+5638_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=219.229 yref=56.649 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.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits outfile=/lscratch/kocevski/35830278/cmap_HighResolution_723427201_724032001_4FGL_J1436.9+5638_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=219.229 yref=56.649 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.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/35830278/Model_4FGL_J1436.9+5638_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/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits.....................!
real 50.16
user 49.12
sys 0.67

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits', '/lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits', expMap='/lscratch/kocevski/35830278/expmap_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits', expCube='/lscratch/kocevski/35830278/ltcube_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/35830278/Model_4FGL_J1436.9+5638_weekly_bin801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1436.9+5638'

4FGL J1436.9+5638
   Spectrum: PowerLaw
357    Prefactor:  8.188e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
358        Index:  1.896e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
359        Scale:  2.649e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/35830278/ft1_filtered_4FGL_J1436.9+5638_weekly_bin801.fits
Spacecraft file(s): /lscratch/kocevski/35830278/ft2_4FGL_J1436.9+5638_weekly_bin801.fits
Exposure map: /lscratch/kocevski/35830278/expmap_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits
Exposure cube: /lscratch/kocevski/35830278/ltcube_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/35830278/Model_4FGL_J1436.9+5638_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) = 20424.6798079

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .16439E-04   1.0000          .0000       .10000E+07
     2 'Prefactor '    .62835E-04   1.0000          .0000       .10000E+07
     3 'Prefactor '    .16976E-03   1.0000          .0000       .10000E+07
     4 'norm      '    2.2525       1.0000          .0000       .10000E+07
     5 'Prefactor '    .41724E-04   1.0000          .0000       .10000E+07
     6 'Prefactor '    21.091       1.0000          .0000       .10000E+07
     7 'Prefactor '    .16143E-06   1.0000          .0000       .10000E+07
     8 'Prefactor '    1.4787       1.0000          .0000       .10000E+07
     9 'Prefactor '    6.5771       1.0000          .0000       .10000E+07
    10 'Prefactor '    .69439E-06   1.0000          .0000       .10000E+07
    11 'Prefactor '    5.8294       1.0000          .0000       .10000E+07
    12 'Prefactor '    63.689       1.0000          .0000       .10000E+07
    13 'Prefactor '    16.500       1.0000          .0000       .10000E+07
    14 'Prefactor '    10.413       1.0000          .0000       .10000E+07
    15 'Prefactor '    .28925E-02   1.0000          .0000       .10000E+07
    16 'norm      '    1.9397       1.0000          .0000       .10000E+07
    17 'Prefactor '    .35141E-04   1.0000          .0000       .10000E+07
    18 'Prefactor '    .92747       1.0000          .0000       .10000E+07
    19 'Prefactor '    6.6718       1.0000          .0000       .10000E+07
    20 'Prefactor '    13.664       1.0000          .0000       .10000E+07
    21 'norm      '    1.3596       1.0000          .0000       .10000E+07
    22 'Prefactor '    11.011       1.0000          .0000       .10000E+07
    23 'Prefactor '    .27228E-01   1.0000          .0000       .10000E+07
    24 'norm      '    .14222E-03   1.0000          .0000       .10000E+07
    25 'Normalizat'    1.0215       1.0000         .10000E-01   10.000    
    26 'Prefactor '    1.0542       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7060E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20424.66     FROM MIGRAD    STATUS=CONVERGED    147 CALLS     2259 TOTAL
                     EDM=   .69E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.3%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        2.9623        .17720E-06** at limit **
   2  Prefactor     .66946E-06    9.2094        .29248E-05** at limit **
   3  Prefactor      .0000        1.7245       -.66740E-06** at limit **
   4  norm          2.2527        1.7973        .50708E-06    .13176E-02
   5  Prefactor     .15726E-06    18.952        .33208E-05** at limit **
   6  Prefactor     20.955        1.4532        .15746E-06   -.70194E-02
   7  Prefactor     .64782E-07    8.7631        .58321E-06** at limit **
   8  Prefactor     1.4805        1.9976        .23045E-06   -.20641E-02
   9  Prefactor     6.5403        2.1748        .18374E-06    .91783E-02
  10  Prefactor      .0000        .73696       -.81465E-06** at limit **
  11  Prefactor     5.8121        10.606        .14370E-05    .50747E-02
  12  Prefactor     63.443        5.5855       -.18338E-06    .26340E-01
  13  Prefactor     17.006        1.9823       -.67206E-07   -.15876E-01
  14  Prefactor     10.432        9.5858        .26633E-05    .48611E-02
  15  Prefactor     .41078E-08    4.3634       -.56952E-07** at limit **
  16  norm          1.9408        .79996       -.98126E-07   -.40516E-02
  17  Prefactor      .0000        1.1722        .67810E-06** at limit **
  18  Prefactor     .92280        1.6237       -.94949E-06    .28686E-02
  19  Prefactor     6.6904        3.6667       -.36069E-07    .32371E-02
  20  Prefactor     13.651        1.2278       -.10476E-06   -.11926E-01
  21  norm          1.3520        .99836        .30560E-06    .14042E-02
  22  Prefactor     12.755        40.217        .51736E-05    .15381E-02
  23  Prefactor     .38858E-09    16.344        .48418E-05** at limit **
  24  norm          .18968E-05    5.1172        .18955E-05** at limit **
  25  Normalizat    1.0212        .10703       -.57805E-06   -.11248E-03
  26  Prefactor     1.0540        .12319       -.43910E-05   -.22652E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 6.69464e-07
  Prefactor  = 0
  norm       = 2.2527
  Prefactor  = 1.57263e-07
  Prefactor  = 20.9549
  Prefactor  = 6.47815e-08
  Prefactor  = 1.48045
  Prefactor  = 6.5403
  Prefactor  = 0
  Prefactor  = 5.81213
  Prefactor  = 63.443
  Prefactor  = 17.0065
  Prefactor  = 10.4322
  Prefactor  = 4.10783e-09
  norm       = 1.94078
  Prefactor  = 0
  Prefactor  = 0.922804
  Prefactor  = 6.69041
  Prefactor  = 13.6514
  norm       = 1.35196
  Prefactor  = 12.7553
  Prefactor  = 3.88578e-10
  norm       = 1.89676e-06
  Normalizat = 1.02124
  Prefactor  = 1.05399
 **********
 **   18 **HESSE 
 **********

 FCN=   20424.66     FROM HESSE     STATUS=OK           526 CALLS     2785 TOTAL
                     EDM=   .22E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        .55010        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .66946E-06    12.608        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor      .0000        1.7021        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          2.2527        1.8086        .68431E-03   -1.5678    
   5  Prefactor     .15726E-06    19.421        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     20.955        21.895        .21781E-03   -1.5616    
   7  Prefactor     .64782E-07    9.1429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.4805        2.0515        .88252E-03   -1.5684    
   9  Prefactor     6.5403        11.893        .39107E-03   -1.5657    
  10  Prefactor      .0000        .73048        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     5.8121        11.057        .41572E-03   -1.5660    
  12  Prefactor     63.443        40.737        .12531E-03   -1.5549    
  13  Prefactor     17.006        17.800        .24630E-03   -1.5625    
  14  Prefactor     10.432        10.923        .31025E-03   -1.5643    
  15  Prefactor     .41078E-08    4.3632        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          1.9408        .80145        .74517E-03   -1.5680    
  17  Prefactor      .0000        1.1755        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .92280        1.6343        .43879E-03   -1.5689    
  19  Prefactor     6.6904        3.6654        .38825E-03   -1.5656    
  20  Prefactor     13.651        11.407        .27071E-03   -1.5634    
  21  norm          1.3520        1.0095        .93642E-03   -1.5685    
  22  Prefactor     12.755        40.395        .30167E-03   -1.5637    
  23  Prefactor     .38858E-09    1.0907        .89065E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          .18968E-05    14.212        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.0212        .90463E-01    .43145E-01   -.92322    
  26  Prefactor     1.0540        .10270        .58215E-01   -.90951    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.23374e-07
Minuit parameter uncertainties:
  1  1.00356e-06
  2  0.00581053
  3  1.32645e-06
  4  1.80861
  5  0.00349493
  6  21.8951
  7  0.00153913
  8  2.05149
  9  11.8927
  10  6.49478e-06
  11  11.057
  12  40.7369
  13  17.7998
  14  10.9226
  15  0.000268569
  16  0.801454
  17  6.06337e-06
  18  1.63433
  19  3.66545
  20  11.4066
  21  1.00946
  22  40.3955
  23  4.2498e-05
  24  0.0103838
  25  0.0904765
  26  0.102718
Done.

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

Extracting fit parameters...

4FGL J1436.9+5638
   Spectrum: PowerLaw
357    Prefactor:  1.701e+01  1.780e+01  0.000e+00  1.000e+06 ( 1.000e-14)
358        Index:  1.896e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
359        Scale:  2.649e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  1.054e+00  1.027e-01  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  1.021e+00  9.048e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.22
Ra Dec: 219.229 56.649
Photon Index (Fixed Index): 1.90 +/- 0.00
Photon Flux (Fixed Index): 9.45e-09 +/- 9.88e-09
Energy Flux (Fixed Index): 8.58e-06 +/- 8.98e-06

TS (Fixed Index): 1.22
Ra Dec: 219.229 56.649
Photon Flux Upper Limit: 3.08999066161e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00229680269263 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/35830278/likelihoodResults_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.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) = 20423.9408826
delta logL = 0.722115374094

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 20423.9150371
delta logL = 0.747960842986

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    8.7485       1.0000          .0000       .10000E+07
     2 'Index     '    2.5040       1.0000          .0000       10.000    
     3 'Normalizat'    1.0086       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0605       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7060E+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=   20423.92     FROM MIGRAD    STATUS=CONVERGED    104 CALLS      312 TOTAL
                     EDM=   .16E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     8.7350        16.303        .13546E-04    .87284E-04
   2  Index         2.5047        .74274        .67024E-02    .75617E-04
   3  Normalizat    1.0086        .10547        .22434E-03   -.36082E-04
   4  Prefactor     1.0605        .12307        .25665E-03   -.19667E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 8.73498
  Index      = 2.50468
  Normalizat = 1.00857
  Prefactor  = 1.06053
 **********
 **   18 **HESSE 
 **********

 FCN=   20423.92     FROM HESSE     STATUS=OK            25 CALLS      337 TOTAL
                     EDM=   .67E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     8.7350        11.608        .54184E-06   -1.5649    
   2  Index         2.5047        .52990        .26810E-03   -.52252    
   3  Normalizat    1.0086        .10523        .89734E-05   -.92744    
   4  Prefactor     1.0605        .12281        .10266E-04   -.90738    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.71968e-13
Minuit parameter uncertainties:
  1  11.6081
  2  0.531232
  3  0.105248
  4  0.122848
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) = 20423.9150363
delta logL = 0.747961686306

Extracting fit parameters...

4FGL J1436.9+5638
   Spectrum: PowerLaw
357    Prefactor:  8.735e+00  1.161e+01  0.000e+00  1.000e+06 ( 1.000e-14)
358        Index:  2.505e+00  5.312e-01  0.000e+00  1.000e+01 (-1.000e+00)
359        Scale:  2.649e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
703    Prefactor:  1.061e+00  1.228e-01  0.000e+00  1.000e+01 ( 1.000e+00)
704        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
705        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
702   Normalization:  1.009e+00  1.052e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.73
Ra Dec: 219.229 56.649
Photon Index (Free Index): 2.50 +/- 0.53
Photon Flux (Free Index): 2.13e-08 +/- 1.63e-08
Energy Flux (Free Index): 6.15e-06 +/- 4.82e-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/35830278/cmap_HighResolution_723427201_724032001_4FGL_J1436.9+5638_weekly_bin801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.30e-03', comment='SUCCESS', photon_flux='9.45e-09', energy_flux2='6.15e-06', photon_flux_error='9.88e-09', dlogl='7.48e-01', energy_flux='8.58e-06', photon_flux2='2.13e-08', job_status='DONE', time_completed='2023-12-12 02:08:53.890301', photon_index_error2='0.53', photon_index2='2.50', ts='1.22', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', photon_flux_upper_limit='3.09e-08', energy_flux_error2='4.82e-06', EG='1.02', time_epoch_completed='1702375733.89', return_code='0', job_id='35830278', GAL2='1.06', EG2='1.01', return_code2='0', energy_flux_error='8.98e-06', photon_flux_error2='1.63e-08', ts2='2.73', photon_index='1.90' WHERE bin_id='801' AND source_name='4FGL J1436.9+5638' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 12 02:08:53 PST 2023

