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

Done.


Performing analysis on: 4FGL_J1412.9+5018_weekly_bin778
RA = 213.241, Dec = 50.301
tmin = 709516801, tmax = 710121601
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='18878008', job_status='RUN', time_executed='2023-07-10 09:34:19.354711', time_epoch_executed='1689006859.35' WHERE source_name='4FGL J1412.9+5018' and cadence='weekly' and bin_id='778'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18878008

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18878008/ft1_4FGL_J1412.9+5018_weekly_bin778.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18878008/ft1_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878008/ft1_filteredMKT_4FGL_J1412.9+5018_weekly_bin778.fits ra=213.241 dec=50.301 rad=12.0 tmin=709516801.0 tmax=710121601.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.32
user 3.89
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.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/18878008/ft1_filteredMKT_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" outfile="/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.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.55
user 0.21
sys 0.13

Number of photons that the gtmktime cut: 1614

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" o/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).

_V02
Working on...
/lscratch/kocevski/18876793/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits.....................!
real 42.65
user 41.56
sys 0.65

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18876793/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits', '/lscratch/kocevski/18876793/ft2_4FGL_J1412.9+5018_weekly_bin778.fits', expMap='/lscratch/kocevski/18876793/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', expCube='/lscratch/kocevski/18876793/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18876793/Model_4FGL_J1412.9+5018_weekly_bin778.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1412.9+5018'

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.555e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18876793/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits
Spacecraft file(s): /lscratch/kocevski/18876793/ft2_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure map: /lscratch/kocevski/18876793/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure cube: /lscratch/kocevski/18876793/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18876793/Model_4FGL_J1412.9+5018_weekly_bin778.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) = 17793.4924701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .50848E-07   1.0000          .0000       .10000E+07
     2 'Prefactor '    33.588       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.4706       1.0000          .0000       .10000E+07
     4 'norm      '    .54657       1.0000          .0000       .10000E+07
     5 'Prefactor '    19.621       1.0000          .0000       .10000E+07
     6 'norm      '    .35527E-08   1.0000          .0000       .10000E+07
     7 'norm      '    3.3012       1.0000          .0000       .10000E+07
     8 'norm      '    22.105       1.0000          .0000       .10000E+07
     9 'Prefactor '    .43444E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .24653E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    .15018       1.0000          .0000       .10000E+07
    12 'Prefactor '    .34650E-06   1.0000          .0000       .10000E+07
    13 'Prefactor '    .52180E-08   1.0000          .0000       .10000E+07
    14 'Prefactor '    2.3442       1.0000          .0000       .10000E+07
    15 'Prefactor '    .38389E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .56274E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .48551E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    18.700       1.0000          .0000       .10000E+07
    19 'Prefactor '    9.6763       1.0000          .0000       .10000E+07
    20 'norm      '    2.0233       1.0000          .0000       .10000E+07
    21 'Prefactor '    .71393E-06   1.0000          .0000       .10000E+07
    22 'Prefactor '    1.5679       1.0000          .0000       .10000E+07
    23 'Prefactor '    .23456E-02   1.0000          .0000       .10000E+07
    24 'norm      '    3.6400       1.0000          .0000       .10000E+07
    25 'Normalizat'    1.1348       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .98567       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6690E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED    153 CALLS     2248 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        .71644       -.17666E-07** at limit **
   2  Prefactor     34.594        27.699       -.18288E-06   -.69741E-01
   3  Prefactor     .45337        348.26        .12658E-05   -.73830E-02
   4  norm          .56073        1.7797       -.78537E-08   -.22916E-03
   5  Prefactor     20.227        24.563       -.12400E-06    .43600E-01
   6  norm           .0000        .19793        .24101E-07** at limit **
   7  norm          3.2993        2.0306        .50589E-08    .52877E-03
   8  norm          22.159        9.1145        .15320E-07   -.75243E-01
   9  Prefactor     .20539E-08    2.6457       -.63473E-07** at limit **
  10  Prefactor     .30198E-07    2.1852       -.80179E-07** at limit **
  11  Prefactor     .15160        3.1664       -.13091E-06** at limit **
  12  Prefactor     .24536E-07    2.1681       -.72976E-07** at limit **
  13  Prefactor     .21627E-06    4.0350        .17082E-06** at limit **
  14  Prefactor     2.3448        1.1093        .51666E-08    .21211E-02
  15  Prefactor     .13861E-06    4.3992        .15436E-06** at limit **
  16  Prefactor     .31086E-08    4.4934       -.52673E-07** at limit **
  17  Prefactor     .18163E-06    9.1365       -.50836E-07** at limit **
  18  Prefactor     18.704        2.2145       -.28946E-07    .77052E-02
  19  Prefactor     9.6541        7.4923       -.25168E-07   -.28274E-02
  20  norm          2.0241        .84416        .49717E-08    .34273E-02
  21  Prefactor      .0000        .92279       -.84784E-07** at limit **
  22  Prefactor     1.5865        3.2536       -.71976E-07   -.20287E-02
  23  Prefactor     .23536E-05    3.3180        .17173E-06** at limit **
  24  norm          3.6524        2.7110       -.70338E-08   -.76888E-03
  25  Normalizat    1.1344        .11948       -.15442E-05   -.47699E-04
  26  Prefactor     .98579        .13822        .25061E-05    .20079E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 34.5936
  Prefactor  = 0.453368
  norm       = 0.560734
  Prefactor  = 20.2272
  norm       = 0
  norm       = 3.2993
  norm       = 22.1589
  Prefactor  = 2.05391e-09
  Prefactor  = 3.01981e-08
  Prefactor  = 0.151595
  Prefactor  = 2.45359e-08
  Prefactor  = 2.16271e-07
  Prefactor  = 2.34475
  Prefactor  = 1.38611e-07
  Prefactor  = 3.10862e-09
  Prefactor  = 1.81632e-07
  Prefactor  = 18.7039
  Prefactor  = 9.65414
  norm       = 2.02413
  Prefactor  = 0
  Prefactor  = 1.58649
  Prefactor  = 2.35356e-06
  norm       = 3.65243
  Normalizat = 1.13439
  Prefactor  = 0.985788
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=OK           520 CALLS     2768 TOTAL
                     EDM=   .92E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        .71282        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     34.594        31.242        .17257E-03   -1.5590    
   3  Prefactor     .45337        27.564        .12270E-01   -1.5694    
   4  norm          .56073        1.8096        .74157E-03   -1.5693    
   5  Prefactor     20.227        28.552        .22583E-03   -1.5618    
   6  norm           .0000        .19681        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.2993        2.0429        .55697E-03   -1.5672    
   8  norm          22.159        9.4229        .21275E-03   -1.5614    
   9  Prefactor     .20539E-08    5.6590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .30198E-07    5.3087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .15160        .95222        .43066E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .24536E-07    5.3547        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .21627E-06    4.9664        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.3448        1.1103        .66932E-03   -1.5677    
  15  Prefactor     .13861E-06    5.9869        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .31086E-08    4.5148        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .18163E-06    9.6596        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     18.704        12.519        .23134E-03   -1.5621    
  19  Prefactor     9.6541        7.5118        .32191E-03   -1.5646    
  20  norm          2.0241        .84961        .72718E-03   -1.5680    
  21  Prefactor      .0000        .92476        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     1.5865        3.2845        .84886E-03   -1.5683    
  23  Prefactor     .23536E-05    10.638        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          3.6524        2.7193        .52926E-03   -1.5670    
  25  Normalizat    1.1344        .10336        .36732E-01   -.88655    
  26  Prefactor     .98579        .11877        .46088E-01   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.20697e-06
Minuit parameter uncertainties:
  1  1.17262e-06
  2  31.2419
  3  7.07012
  4  1.80961
  5  28.5523
  6  2.19562e-06
  7  2.04292
  8  9.42292
  9  0.000215173
  10  0.000801124
  11  0.759874
  12  0.000725246
  13  0.00207267
  14  1.11026
  15  0.0018219
  16  0.000235943
  17  0.00264922
  18  12.5188
  19  7.51176
  20  0.849605
  21  4.15883e-06
  22  3.28453
  23  0.0100077
  24  2.71929
  25  0.103377
  26  0.118804
utfile=/lscratch/kocevski/18878008/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits
.....................!
real 16.63
user 16.15
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18878008/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878008/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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/18878008/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
.....................!
real 59.68
user 55.88
sys 3.41

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

Setting source of interest to:
4FGL J1412.9+5018 @ 213.241 50.301

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878008/cmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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=213.241 yref=50.301 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.56
user 0.21
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878008/cmap_HighResolution_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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=213.241 yref=50.301 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.59
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" scfile=/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18878008/Model_4FGL_J1412.9+5018_weekly_bin778.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 GALnumber of points = 17494
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1412.9+5018_weekly_bin778
RA = 213.241, Dec = 50.301
tmin = 709516801, tmax = 710121601
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='18878670', job_status='RUN', time_executed='2023-07-10 09:37:35.545534', time_epoch_executed='1689007055.55' WHERE source_name='4FGL J1412.9+5018' and cadence='weekly' and bin_id='778'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18878670

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18878670/ft1_4FGL_J1412.9+5018_weekly_bin778.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18878670/ft1_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878670/ft1_filteredMKT_4FGL_J1412.9+5018_weekly_bin778.fits ra=213.241 dec=50.301 rad=12.0 tmin=709516801.0 tmax=710121601.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.53
user 4.07
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.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/18878670/ft1_filteredMKT_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" outfile="/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.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.59
user 0.24
sys 0.14

Number of photons that the gtmktime cut: 1614

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" oDone.

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

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  3.020e-08  8.011e-04  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  1.188e-01  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  1.034e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 213.241 50.301
Photon Flux Upper Limit: 2.29868502666e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0018059210056 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18876793/likelihoodResults_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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): 102
logL (Free Index) = 17793.4583843
delta logL = -0.000175645829586

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582109
delta logL = -2.22165908781e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      301 TOTAL
                     EDM=   .57E-13    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    .23027E-02    .42118E-03** at limit **
   2  Index         4.5379        5.1428        .50000        .90949E-10
   3  Normalizat    1.1344        .10037E-03    .36751E-01   -.22963E-03
   4  Prefactor     .98579        .11955E-03    .46090E-01   -.57397E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Index      = 4.53795
  Normalizat = 1.13439
  Prefactor  = 0.985787
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      334 TOTAL
                     EDM=   .55E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    .22153E-01    .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         4.5379        5.9155        .50000       -.92543E-01
   3  Normalizat    1.1344        .30830E-03    .22184E-03   -.88655    
   4  Prefactor     .98579        .36710E-03    .27987E-03   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.48947e-13
Minuit parameter uncertainties:
  1  2.47366e-06
  2  9803.92
  3  0.000308298
  4  0.0003671
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582087
delta logL = 2.86672729999e-09

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.551e-11  2.474e-06  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  4.538e+00  9.804e+03  0.000e+00  1.000e+01 (-1.000e+00)
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  3.671e-04  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  3.083e-04  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 213.241 50.301

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/18876793/cmap_HighResolution_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.81e-03', job_status='DONE', photon_flux_upper_limit='2.30e-08', time_completed='2023-07-10 09:40:55.965065', job_id='18876793', GAL2='0.99', fit_tolerance='1e-08', EG2='1.13', EG='1.13', time_epoch_completed='1689007255.97', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.87e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='778' AND source_name='4FGL J1412.9+5018' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:40:56 PDT 2023

utfile=/lscratch/kocevski/18878670/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits
.....................!
real 17.43
user 16.88
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18878670/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878670/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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/18878670/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
.....................!
real 63.54
user 59.16
sys 3.77

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

Setting source of interest to:
4FGL J1412.9+5018 @ 213.241 50.301

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878670/cmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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=213.241 yref=50.301 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.50
user 0.23
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits outfile=/lscratch/kocevski/18878670/cmap_HighResolution_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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=213.241 yref=50.301 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.52
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits evtable="EVENTS" scfile=/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18878670/Model_4FGL_J1412.9+5018_weekly_bin778.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/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits.....................!
real 43.28
user 42.11
sys 0.78

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits', '/lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits', expMap='/lscratch/kocevski/18878008/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', expCube='/lscratch/kocevski/18878008/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18878008/Model_4FGL_J1412.9+5018_weekly_bin778.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1412.9+5018'

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.555e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18878008/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits
Spacecraft file(s): /lscratch/kocevski/18878008/ft2_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure map: /lscratch/kocevski/18878008/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure cube: /lscratch/kocevski/18878008/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18878008/Model_4FGL_J1412.9+5018_weekly_bin778.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) = 17793.4924701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .50848E-07   1.0000          .0000       .10000E+07
     2 'Prefactor '    33.588       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.4706       1.0000          .0000       .10000E+07
     4 'norm      '    .54657       1.0000          .0000       .10000E+07
     5 'Prefactor '    19.621       1.0000          .0000       .10000E+07
     6 'norm      '    .35527E-08   1.0000          .0000       .10000E+07
     7 'norm      '    3.3012       1.0000          .0000       .10000E+07
     8 'norm      '    22.105       1.0000          .0000       .10000E+07
     9 'Prefactor '    .43444E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .24653E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    .15018       1.0000          .0000       .10000E+07
    12 'Prefactor '    .34650E-06   1.0000          .0000       .10000E+07
    13 'Prefactor '    .52180E-08   1.0000          .0000       .10000E+07
    14 'Prefactor '    2.3442       1.0000          .0000       .10000E+07
    15 'Prefactor '    .38389E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .56274E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .48551E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    18.700       1.0000          .0000       .10000E+07
    19 'Prefactor '    9.6763       1.0000          .0000       .10000E+07
    20 'norm      '    2.0233       1.0000          .0000       .10000E+07
    21 'Prefactor '    .71393E-06   1.0000          .0000       .10000E+07
    22 'Prefactor '    1.5679       1.0000          .0000       .10000E+07
    23 'Prefactor '    .23456E-02   1.0000          .0000       .10000E+07
    24 'norm      '    3.6400       1.0000          .0000       .10000E+07
    25 'Normalizat'    1.1348       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .98567       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6690E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED    153 CALLS     2248 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        .71644       -.17666E-07** at limit **
   2  Prefactor     34.594        27.699       -.18288E-06   -.69741E-01
   3  Prefactor     .45337        348.26        .12658E-05   -.73830E-02
   4  norm          .56073        1.7797       -.78537E-08   -.22916E-03
   5  Prefactor     20.227        24.563       -.12400E-06    .43600E-01
   6  norm           .0000        .19793        .24101E-07** at limit **
   7  norm          3.2993        2.0306        .50589E-08    .52877E-03
   8  norm          22.159        9.1145        .15320E-07   -.75243E-01
   9  Prefactor     .20539E-08    2.6457       -.63473E-07** at limit **
  10  Prefactor     .30198E-07    2.1852       -.80179E-07** at limit **
  11  Prefactor     .15160        3.1664       -.13091E-06** at limit **
  12  Prefactor     .24536E-07    2.1681       -.72976E-07** at limit **
  13  Prefactor     .21627E-06    4.0350        .17082E-06** at limit **
  14  Prefactor     2.3448        1.1093        .51666E-08    .21211E-02
  15  Prefactor     .13861E-06    4.3992        .15436E-06** at limit **
  16  Prefactor     .31086E-08    4.4934       -.52673E-07** at limit **
  17  Prefactor     .18163E-06    9.1365       -.50836E-07** at limit **
  18  Prefactor     18.704        2.2145       -.28946E-07    .77052E-02
  19  Prefactor     9.6541        7.4923       -.25168E-07   -.28274E-02
  20  norm          2.0241        .84416        .49717E-08    .34273E-02
  21  Prefactor      .0000        .92279       -.84784E-07** at limit **
  22  Prefactor     1.5865        3.2536       -.71976E-07   -.20287E-02
  23  Prefactor     .23536E-05    3.3180        .17173E-06** at limit **
  24  norm          3.6524        2.7110       -.70338E-08   -.76888E-03
  25  Normalizat    1.1344        .11948       -.15442E-05   -.47699E-04
  26  Prefactor     .98579        .13822        .25061E-05    .20079E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 34.5936
  Prefactor  = 0.453368
  norm       = 0.560734
  Prefactor  = 20.2272
  norm       = 0
  norm       = 3.2993
  norm       = 22.1589
  Prefactor  = 2.05391e-09
  Prefactor  = 3.01981e-08
  Prefactor  = 0.151595
  Prefactor  = 2.45359e-08
  Prefactor  = 2.16271e-07
  Prefactor  = 2.34475
  Prefactor  = 1.38611e-07
  Prefactor  = 3.10862e-09
  Prefactor  = 1.81632e-07
  Prefactor  = 18.7039
  Prefactor  = 9.65414
  norm       = 2.02413
  Prefactor  = 0
  Prefactor  = 1.58649
  Prefactor  = 2.35356e-06
  norm       = 3.65243
  Normalizat = 1.13439
  Prefactor  = 0.985788
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=OK           520 CALLS     2768 TOTAL
                     EDM=   .92E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        .71282        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     34.594        31.242        .17257E-03   -1.5590    
   3  Prefactor     .45337        27.564        .12270E-01   -1.5694    
   4  norm          .56073        1.8096        .74157E-03   -1.5693    
   5  Prefactor     20.227        28.552        .22583E-03   -1.5618    
   6  norm           .0000        .19681        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.2993        2.0429        .55697E-03   -1.5672    
   8  norm          22.159        9.4229        .21275E-03   -1.5614    
   9  Prefactor     .20539E-08    5.6590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .30198E-07    5.3087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .15160        .95222        .43066E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .24536E-07    5.3547        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .21627E-06    4.9664        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.3448        1.1103        .66932E-03   -1.5677    
  15  Prefactor     .13861E-06    5.9869        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .31086E-08    4.5148        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .18163E-06    9.6596        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     18.704        12.519        .23134E-03   -1.5621    
  19  Prefactor     9.6541        7.5118        .32191E-03   -1.5646    
  20  norm          2.0241        .84961        .72718E-03   -1.5680    
  21  Prefactor      .0000        .92476        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     1.5865        3.2845        .84886E-03   -1.5683    
  23  Prefactor     .23536E-05    10.638        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          3.6524        2.7193        .52926E-03   -1.5670    
  25  Normalizat    1.1344        .10336        .36732E-01   -.88655    
  26  Prefactor     .98579        .11877        .46088E-01   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.20697e-06
Minuit parameter uncertainties:
  1  1.17262e-06
  2  31.2419
  3  7.07012
  4  1.80961
  5  28.5523
  6  2.19562e-06
  7  2.04292
  8  9.42292
  9  0.000215173
  10  0.000801124
  11  0.759874
  12  0.000725246
  13  0.00207267
  14  1.11026
  15  0.0018219
  16  0.000235943
  17  0.00264922
  18  12.5188
  19  7.51176
  20  0.849605
  21  4.15883e-06
  22  3.28453
  23  0.0100077
  24  2.71929
  25  0.103377
  26  0.118804
Done.

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

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  3.020e-08  8.011e-04  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  1.188e-01  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  1.034e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 213.241 50.301
Photon Flux Upper Limit: 2.29868502666e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0018059210056 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18878008/likelihoodResults_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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): 102
logL (Free Index) = 17793.4583843
delta logL = -0.000175645829586

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582109
delta logL = -2.22165908781e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      301 TOTAL
                     EDM=   .57E-13    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    .23027E-02    .42118E-03** at limit **
   2  Index         4.5379        5.1428        .50000        .90949E-10
   3  Normalizat    1.1344        .10037E-03    .36751E-01   -.22963E-03
   4  Prefactor     .98579        .11955E-03    .46090E-01   -.57397E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Index      = 4.53795
  Normalizat = 1.13439
  Prefactor  = 0.985787
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      334 TOTAL
                     EDM=   .55E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    .22153E-01    .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         4.5379        5.9155        .50000       -.92543E-01
   3  Normalizat    1.1344        .30830E-03    .22184E-03   -.88655    
   4  Prefactor     .98579        .36710E-03    .27987E-03   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.48947e-13
Minuit parameter uncertainties:
  1  2.47366e-06
  2  9803.92
  3  0.000308298
  4  0.0003671
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582087
delta logL = 2.86672729999e-09

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.551e-11  2.474e-06  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  4.538e+00  9.804e+03  0.000e+00  1.000e+01 (-1.000e+00)
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  3.671e-04  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  3.083e-04  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 213.241 50.301

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/18878008/cmap_HighResolution_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.81e-03', job_status='DONE', photon_flux_upper_limit='2.30e-08', time_completed='2023-07-10 09:46:28.527650', job_id='18878008', GAL2='0.99', fit_tolerance='1e-08', EG2='1.13', EG='1.13', time_epoch_completed='1689007588.53', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.87e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='778' AND source_name='4FGL J1412.9+5018' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:46:28 PDT 2023

_V02
Working on...
/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits.....................!
real 45.71
user 44.53
sys 0.80

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits', '/lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits', expMap='/lscratch/kocevski/18878670/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', expCube='/lscratch/kocevski/18878670/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18878670/Model_4FGL_J1412.9+5018_weekly_bin778.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1412.9+5018'

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.555e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18878670/ft1_filtered_4FGL_J1412.9+5018_weekly_bin778.fits
Spacecraft file(s): /lscratch/kocevski/18878670/ft2_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure map: /lscratch/kocevski/18878670/expmap_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
Exposure cube: /lscratch/kocevski/18878670/ltcube_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18878670/Model_4FGL_J1412.9+5018_weekly_bin778.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) = 17793.4924701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .50848E-07   1.0000          .0000       .10000E+07
     2 'Prefactor '    33.588       1.0000          .0000       .10000E+07
     3 'Prefactor '    1.4706       1.0000          .0000       .10000E+07
     4 'norm      '    .54657       1.0000          .0000       .10000E+07
     5 'Prefactor '    19.621       1.0000          .0000       .10000E+07
     6 'norm      '    .35527E-08   1.0000          .0000       .10000E+07
     7 'norm      '    3.3012       1.0000          .0000       .10000E+07
     8 'norm      '    22.105       1.0000          .0000       .10000E+07
     9 'Prefactor '    .43444E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    .24653E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    .15018       1.0000          .0000       .10000E+07
    12 'Prefactor '    .34650E-06   1.0000          .0000       .10000E+07
    13 'Prefactor '    .52180E-08   1.0000          .0000       .10000E+07
    14 'Prefactor '    2.3442       1.0000          .0000       .10000E+07
    15 'Prefactor '    .38389E-03   1.0000          .0000       .10000E+07
    16 'Prefactor '    .56274E-03   1.0000          .0000       .10000E+07
    17 'Prefactor '    .48551E-02   1.0000          .0000       .10000E+07
    18 'Prefactor '    18.700       1.0000          .0000       .10000E+07
    19 'Prefactor '    9.6763       1.0000          .0000       .10000E+07
    20 'norm      '    2.0233       1.0000          .0000       .10000E+07
    21 'Prefactor '    .71393E-06   1.0000          .0000       .10000E+07
    22 'Prefactor '    1.5679       1.0000          .0000       .10000E+07
    23 'Prefactor '    .23456E-02   1.0000          .0000       .10000E+07
    24 'norm      '    3.6400       1.0000          .0000       .10000E+07
    25 'Normalizat'    1.1348       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .98567       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6690E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED    153 CALLS     2248 TOTAL
                     EDM=   .15E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  2.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        .71644       -.17666E-07** at limit **
   2  Prefactor     34.594        27.699       -.18288E-06   -.69741E-01
   3  Prefactor     .45337        348.26        .12658E-05   -.73830E-02
   4  norm          .56073        1.7797       -.78537E-08   -.22916E-03
   5  Prefactor     20.227        24.563       -.12400E-06    .43600E-01
   6  norm           .0000        .19793        .24101E-07** at limit **
   7  norm          3.2993        2.0306        .50589E-08    .52877E-03
   8  norm          22.159        9.1145        .15320E-07   -.75243E-01
   9  Prefactor     .20539E-08    2.6457       -.63473E-07** at limit **
  10  Prefactor     .30198E-07    2.1852       -.80179E-07** at limit **
  11  Prefactor     .15160        3.1664       -.13091E-06** at limit **
  12  Prefactor     .24536E-07    2.1681       -.72976E-07** at limit **
  13  Prefactor     .21627E-06    4.0350        .17082E-06** at limit **
  14  Prefactor     2.3448        1.1093        .51666E-08    .21211E-02
  15  Prefactor     .13861E-06    4.3992        .15436E-06** at limit **
  16  Prefactor     .31086E-08    4.4934       -.52673E-07** at limit **
  17  Prefactor     .18163E-06    9.1365       -.50836E-07** at limit **
  18  Prefactor     18.704        2.2145       -.28946E-07    .77052E-02
  19  Prefactor     9.6541        7.4923       -.25168E-07   -.28274E-02
  20  norm          2.0241        .84416        .49717E-08    .34273E-02
  21  Prefactor      .0000        .92279       -.84784E-07** at limit **
  22  Prefactor     1.5865        3.2536       -.71976E-07   -.20287E-02
  23  Prefactor     .23536E-05    3.3180        .17173E-06** at limit **
  24  norm          3.6524        2.7110       -.70338E-08   -.76888E-03
  25  Normalizat    1.1344        .11948       -.15442E-05   -.47699E-04
  26  Prefactor     .98579        .13822        .25061E-05    .20079E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 34.5936
  Prefactor  = 0.453368
  norm       = 0.560734
  Prefactor  = 20.2272
  norm       = 0
  norm       = 3.2993
  norm       = 22.1589
  Prefactor  = 2.05391e-09
  Prefactor  = 3.01981e-08
  Prefactor  = 0.151595
  Prefactor  = 2.45359e-08
  Prefactor  = 2.16271e-07
  Prefactor  = 2.34475
  Prefactor  = 1.38611e-07
  Prefactor  = 3.10862e-09
  Prefactor  = 1.81632e-07
  Prefactor  = 18.7039
  Prefactor  = 9.65414
  norm       = 2.02413
  Prefactor  = 0
  Prefactor  = 1.58649
  Prefactor  = 2.35356e-06
  norm       = 3.65243
  Normalizat = 1.13439
  Prefactor  = 0.985788
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=OK           520 CALLS     2768 TOTAL
                     EDM=   .92E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        .71282        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     34.594        31.242        .17257E-03   -1.5590    
   3  Prefactor     .45337        27.564        .12270E-01   -1.5694    
   4  norm          .56073        1.8096        .74157E-03   -1.5693    
   5  Prefactor     20.227        28.552        .22583E-03   -1.5618    
   6  norm           .0000        .19681        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  norm          3.2993        2.0429        .55697E-03   -1.5672    
   8  norm          22.159        9.4229        .21275E-03   -1.5614    
   9  Prefactor     .20539E-08    5.6590        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .30198E-07    5.3087        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .15160        .95222        .43066E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .24536E-07    5.3547        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .21627E-06    4.9664        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     2.3448        1.1103        .66932E-03   -1.5677    
  15  Prefactor     .13861E-06    5.9869        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .31086E-08    4.5148        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .18163E-06    9.6596        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     18.704        12.519        .23134E-03   -1.5621    
  19  Prefactor     9.6541        7.5118        .32191E-03   -1.5646    
  20  norm          2.0241        .84961        .72718E-03   -1.5680    
  21  Prefactor      .0000        .92476        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     1.5865        3.2845        .84886E-03   -1.5683    
  23  Prefactor     .23536E-05    10.638        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  norm          3.6524        2.7193        .52926E-03   -1.5670    
  25  Normalizat    1.1344        .10336        .36732E-01   -.88655    
  26  Prefactor     .98579        .11877        .46088E-01   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.20697e-06
Minuit parameter uncertainties:
  1  1.17262e-06
  2  31.2419
  3  7.07012
  4  1.80961
  5  28.5523
  6  2.19562e-06
  7  2.04292
  8  9.42292
  9  0.000215173
  10  0.000801124
  11  0.759874
  12  0.000725246
  13  0.00207267
  14  1.11026
  15  0.0018219
  16  0.000235943
  17  0.00264922
  18  12.5188
  19  7.51176
  20  0.849605
  21  4.15883e-06
  22  3.28453
  23  0.0100077
  24  2.71929
  25  0.103377
  26  0.118804
Done.

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

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  3.020e-08  8.011e-04  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  2.665e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  1.188e-01  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  1.034e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 213.241 50.301
Photon Flux Upper Limit: 2.29868502666e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0018059210056 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/18878670/likelihoodResults_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.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): 102
logL (Free Index) = 17793.4583843
delta logL = -0.000175645829586

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582109
delta logL = -2.22165908781e-06

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   17793.46     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      301 TOTAL
                     EDM=   .57E-13    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .55511E-10    .23027E-02    .42118E-03** at limit **
   2  Index         4.5379        5.1428        .50000        .90949E-10
   3  Normalizat    1.1344        .10037E-03    .36751E-01   -.22963E-03
   4  Prefactor     .98579        .11955E-03    .46090E-01   -.57397E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.55112e-11
  Index      = 4.53795
  Normalizat = 1.13439
  Prefactor  = 0.985787
 **********
 **   18 **HESSE 
 **********

 FCN=   17793.46     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      334 TOTAL
                     EDM=   .55E-12    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .55511E-10    .22153E-01    .84235E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         4.5379        5.9155        .50000       -.92543E-01
   3  Normalizat    1.1344        .30830E-03    .22184E-03   -.88655    
   4  Prefactor     .98579        .36710E-03    .27987E-03   -.93205    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.48947e-13
Minuit parameter uncertainties:
  1  2.47366e-06
  2  9803.92
  3  0.000308298
  4  0.0003671
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 17793.4582087
delta logL = 2.86672729999e-09

Extracting fit parameters...

4FGL J1412.9+5018
   Spectrum: PowerLaw
332    Prefactor:  5.551e-11  2.474e-06  0.000e+00  1.000e+06 ( 1.000e-13)
333        Index:  4.538e+00  9.804e+03  0.000e+00  1.000e+01 (-1.000e+00)
334        Scale:  6.514e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.858e-01  3.671e-04  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  1.134e+00  3.083e-04  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 213.241 50.301

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/18878670/cmap_HighResolution_709516801_710121601_4FGL_J1412.9+5018_weekly_bin778.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.81e-03', job_status='DONE', photon_flux_upper_limit='2.30e-08', time_completed='2023-07-10 09:49:59.710898', job_id='18878670', GAL2='0.99', fit_tolerance='1e-08', EG2='1.13', EG='1.13', time_epoch_completed='1689007799.71', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.99', dlogl='2.87e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.66' WHERE bin_id='778' AND source_name='4FGL J1412.9+5018' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:49:59 PDT 2023

