/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_J1208.4+6121_weekly_bin801
RA = 182.114, Dec = 61.3559
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='35829803', job_status='RUN', time_executed='2023-12-12 01:40:58.318504', time_epoch_executed='1702374058.32' WHERE source_name='4FGL J1208.4+6121' and cadence='weekly' and bin_id='801'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/35829803

Creating custom pfile directory:
/lscratch/kocevski/35829803/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/35829803/ft1_4FGL_J1208.4+6121_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/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/35829803/ft1_4FGL_J1208.4+6121_weekly_bin801.fits outfile=/lscratch/kocevski/35829803/ft1_filteredMKT_4FGL_J1208.4+6121_weekly_bin801.fits ra=182.114 dec=61.3559 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.50
user 4.21
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_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/35829803/ft1_filteredMKT_4FGL_J1208.4+6121_weekly_bin801.fits evtable="EVENTS" outfile="/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_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.42
user 0.23
sys 0.14

Number of photons that the gtmktime cut: 1743

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits" evtable="EVENTS" scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits sctable="SC_DATA" outfile=/lscratch/kocevski/35829803/ltcube_723427201_724032001_4FGL_J1208.4+6121_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/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits
.....................!
real 18.50
user 18.15
sys 0.21

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits sctable="SC_DATA" expcube=/lscratch/kocevski/35829803/ltcube_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits outfile=/lscratch/kocevski/35829803/expmap_723427201_724032001_4FGL_J1208.4+6121_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/35829803/ltcube_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits
.....................!
real 67.70
user 63.65
sys 3.66

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 J1208.4+6121 @ 182.114 61.3559

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits outfile=/lscratch/kocevski/35829803/cmap_723427201_724032001_4FGL_J1208.4+6121_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=182.114 yref=61.3559 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.42
user 0.25
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits outfile=/lscratch/kocevski/35829803/cmap_HighResolution_723427201_724032001_4FGL_J1208.4+6121_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=182.114 yref=61.3559 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.43
user 0.25
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits evtable="EVENTS" scfile=/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/35829803/Model_4FGL_J1208.4+6121_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/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits.....................!
real 60.26
user 59.22
sys 0.66

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits', '/lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits', expMap='/lscratch/kocevski/35829803/expmap_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits', expCube='/lscratch/kocevski/35829803/ltcube_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/35829803/Model_4FGL_J1208.4+6121_weekly_bin801.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1208.4+6121'

4FGL J1208.4+6121
   Spectrum: PowerLaw
372    Prefactor:  1.772e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-14)
373        Index:  2.073e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
374        Scale:  2.978e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/35829803/ft1_filtered_4FGL_J1208.4+6121_weekly_bin801.fits
Spacecraft file(s): /lscratch/kocevski/35829803/ft2_4FGL_J1208.4+6121_weekly_bin801.fits
Exposure map: /lscratch/kocevski/35829803/expmap_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits
Exposure cube: /lscratch/kocevski/35829803/ltcube_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/35829803/Model_4FGL_J1208.4+6121_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) = 18901.0158173

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .84156E-05   1.0000          .0000       .10000E+07
     2 'norm      '    5.5408       1.0000          .0000       .10000E+07
     3 'Prefactor '    8.2507       1.0000          .0000       .10000E+07
     4 'norm      '    1.6698       1.0000          .0000       .10000E+07
     5 'Prefactor '    34.083       1.0000          .0000       .10000E+07
     6 'norm      '    5.2822       1.0000          .0000       .10000E+07
     7 'Prefactor '    .39986E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    3.5223       1.0000          .0000       .10000E+07
     9 'Prefactor '    .12306E-02   1.0000          .0000       .10000E+07
    10 'Prefactor '    .93499E-04   1.0000          .0000       .10000E+07
    11 'Prefactor '    3.6109       1.0000          .0000       .10000E+07
    12 'norm      '    .38162       1.0000          .0000       .10000E+07
    13 'norm      '    .33655E-05   1.0000          .0000       .10000E+07
    14 'Prefactor '    4.0859       1.0000          .0000       .10000E+07
    15 'Prefactor '    13.011       1.0000          .0000       .10000E+07
    16 'norm      '    .17822E-04   1.0000          .0000       .10000E+07
    17 'Prefactor '    .13277E-03   1.0000          .0000       .10000E+07
    18 'norm      '    1.3675       1.0000          .0000       .10000E+07
    19 'norm      '    .98336       1.0000          .0000       .10000E+07
    20 'Prefactor '    1.1808       1.0000          .0000       .10000E+07
    21 'norm      '    3.2130       1.0000          .0000       .10000E+07
    22 'norm      '    .75882       1.0000          .0000       .10000E+07
    23 'Prefactor '    .31622E-04   1.0000          .0000       .10000E+07
    24 'Prefactor '    .90275E-04   1.0000          .0000       .10000E+07
    25 'Prefactor '    .76408E-05   1.0000          .0000       .10000E+07
    26 'Prefactor '    .21849E-03   1.0000          .0000       .10000E+07
    27 'Prefactor '    .27997E-03   1.0000          .0000       .10000E+07
    28 'Normalizat'    1.2736       1.0000         .10000E-01   10.000    
    29 'Prefactor '    .77879       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7100E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   18900.99     FROM MIGRAD    STATUS=CONVERGED    234 CALLS     2775 TOTAL
                     EDM=   .80E-11  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        9.2255        .49648E-07** at limit **
   2  norm          5.5424        1.6068        .26232E-07   -.34028E-03
   3  Prefactor     9.1001        253.94        .19317E-05    .59362E-04
   4  norm          1.6684        1.1930        .30035E-07    .34062E-03
   5  Prefactor     33.864        44.253       -.42571E-06   -.14427E-03
   6  norm          5.2830        1.5608       -.86567E-08    .49170E-03
   7  Prefactor      .0000        7.5227        .10363E-06** at limit **
   8  Prefactor     3.5452        3.8217        .29522E-06    .28435E-03
   9  Prefactor      .0000        12.090       -.21385E-06** at limit **
  10  Prefactor      .0000        2.2735        .38570E-06** at limit **
  11  Prefactor     3.6107        1.9364        .95549E-07   -.82549E-03
  12  norm          .37028        9.1891        .24886E-06    .16022E-04
  13  norm           .0000        1.5776       -.15304E-06** at limit **
  14  Prefactor     4.0860        2.9491        .15945E-06    .77319E-03
  15  Prefactor     13.008        10.023       -.18882E-07    .91373E-05
  16  norm           .0000        15.625       -.94733E-06** at limit **
  17  Prefactor      .0000        5.6937        .25359E-06** at limit **
  18  norm          1.3675        1.5981        .14379E-06    .17771E-03
  19  norm          .98394        2.6310       -.63465E-07    .19125E-03
  20  Prefactor     1.1812        2.5308        .46603E-06    .34006E-03
  21  norm          3.2139        1.3594        .19773E-07   -.14445E-02
  22  norm          .75856        .92694       -.11172E-07    .97184E-03
  23  Prefactor      .0000        32.689        .21974E-06** at limit **
  24  Prefactor      .0000        2.1904        .17462E-06** at limit **
  25  Prefactor      .0000        9.9157       -.41904E-06** at limit **
  26  Prefactor      .0000        6.7738        .21609E-06** at limit **
  27  Prefactor      .0000        22.142        .15703E-05** at limit **
  28  Normalizat    1.2735        .11169       -.55576E-05    .28846E-04
  29  Prefactor     .77879        .13526        .54886E-05    .81028E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  norm       = 5.54239
  Prefactor  = 9.10006
  norm       = 1.66837
  Prefactor  = 33.8644
  norm       = 5.28297
  Prefactor  = 0
  Prefactor  = 3.54524
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 3.61069
  norm       = 0.370276
  norm       = 0
  Prefactor  = 4.08601
  Prefactor  = 13.0083
  norm       = 0
  Prefactor  = 0
  norm       = 1.36749
  norm       = 0.983941
  Prefactor  = 1.18116
  norm       = 3.21386
  norm       = 0.758562
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  Prefactor  = 0
  Normalizat = 1.27351
  Prefactor  = 0.778793
 **********
 **   18 **HESSE 
 **********

 FCN=   18900.99     FROM HESSE     STATUS=OK           627 CALLS     3402 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        9.2293        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          5.5424        1.6080        .42658E-03   -1.5661    
   3  Prefactor     9.1001        247.76        .34878E-03   -1.5648    
   4  norm          1.6684        1.2080        .81555E-03   -1.5682    
   5  Prefactor     33.864        44.044        .17131E-03   -1.5592    
   6  norm          5.2830        1.5604        .43709E-03   -1.5662    
   7  Prefactor      .0000        7.5094        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     3.5452        3.8233        .53839E-03   -1.5670    
   9  Prefactor      .0000        12.047        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor      .0000        2.2759        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     3.6107        1.9405        .53147E-03   -1.5670    
  12  norm          .37028        2.0561        .91648E-02   -1.5696    
  13  norm           .0000        1.5673        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.0860        2.9529        .49852E-03   -1.5668    
  15  Prefactor     13.008        10.033        .27744E-03   -1.5636    
  16  norm           .0000        .35996        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor      .0000        5.7016        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          1.3675        1.6214        .93243E-03   -1.5685    
  19  norm          .98394        2.6351        .43176E-03   -1.5688    
  20  Prefactor     1.1812        2.6046        .10515E-02   -1.5686    
  21  norm          3.2139        1.3782        .56494E-03   -1.5672    
  22  norm          .75856        .93617        .56056E-03   -1.5691    
  23  Prefactor      .0000        32.653        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor      .0000        2.1932        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor      .0000        9.9230        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Prefactor      .0000        6.7713        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor      .0000        .95738        .49202E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Normalizat    1.2735        .97073E-01    .33296E-01   -.84360    
  29  Prefactor     .77879        .11671        .71130E-01   -1.0051    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.14978e-08
Minuit parameter uncertainties:
  1  9.0213e-06
  2  1.60798
  3  94.971
  4  1.20796
  5  44.0445
  6  1.56041
  7  2.0991e-06
  8  3.82326
  9  1.50781e-05
  10  1.76415e-06
  11  1.94047
  12  1.7451
  13  8.33371e-07
  14  2.95288
  15  10.0331
  16  3.1516e-06
  17  6.09237e-06
  18  1.62139
  19  2.63508
  20  2.60462
  21  1.37818
  22  0.936169
  23  1.41981e-05
  24  1.62774e-06
  25  1.13677e-05
  26  6.02155e-06
  27  3.35903e-06
  28  0.0970872
  29  0.116749
Done.

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

Extracting fit parameters...

4FGL J1208.4+6121
   Spectrum: PowerLaw
372    Prefactor:  1.301e+01  1.003e+01  0.000e+00  1.000e+06 ( 1.000e-14)
373        Index:  2.073e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
374        Scale:  2.978e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
707    Prefactor:  7.788e-01  1.167e-01  0.000e+00  1.000e+01 ( 1.000e+00)
708        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
709        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
706   Normalization:  1.274e+00  9.709e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.08
Ra Dec: 182.114 61.356
Photon Index (Fixed Index): 2.07 +/- 0.00
Photon Flux (Fixed Index): 1.38e-08 +/- 1.06e-08
Energy Flux (Fixed Index): 8.02e-06 +/- 6.18e-06

TS (Fixed Index): 3.08
Ra Dec: 182.114 61.356
Photon Flux Upper Limit: 3.78863862445e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.0028584388377 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/35829803/likelihoodResults_723427201_724032001_4FGL_J1208.4+6121_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) = 18900.9427712
delta logL = 0.051848879928

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 18900.9394506
delta logL = 0.0551695134127

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   18900.94     FROM MIGRAD    STATUS=FAILED       107 CALLS      327 TOTAL
                     EDM=   .14E-06    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.8909        17.716        .63648E-04    .79935E-03
   2  Index         2.2898        .95613        .93624E-02    .16502E-02
   3  Normalizat    1.2679        .11248        .20733E-03    .26320E-05
   4  Prefactor     .78264        .13494        .31405E-03    .72400E-06
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   18900.94     FROM SIMPLEX   STATUS=UNCHANGED     79 CALLS      406 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.8909        17.716        .13353E-04   -1.5645    
   2  Index         2.2898        .95613        .50716E-03   -.57287    
   3  Normalizat    1.2679        .11248        .15980E-03   -.84531    
   4  Prefactor     .78264        .13494        .24318E-03   -1.0037    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   18900.94     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      435 TOTAL
                     EDM=   .12E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     9.8909        12.869        .12730E-04   -.35723E-04
   2  Index         2.2898        .69702        .18725E-02    .65222E-04
   3  Normalizat    1.2679        .11096        .82932E-05    .21933E-05
   4  Prefactor     .78264        .13417        .12562E-04    .72400E-06
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 9.89088
  Index      = 2.28978
  Normalizat = 1.26786
  Prefactor  = 0.782638
 **********
 **   18 **HESSE 
 **********

 FCN=   18900.94     FROM HESSE     STATUS=OK            25 CALLS      460 TOTAL
                     EDM=   .92E-14    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     9.8909        12.340        .50919E-06   -1.5645    
   2  Index         2.2898        .66833        .37449E-03   -.57287    
   3  Normalizat    1.2679        .11051        .16586E-05   -.84531    
   4  Prefactor     .78264        .13371        .25124E-05   -1.0037    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.23347e-15
Minuit parameter uncertainties:
  1  12.3398
  2  0.671183
  3  0.110531
  4  0.133766
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) = 18900.9394426
delta logL = 0.0551774637679

Extracting fit parameters...

4FGL J1208.4+6121
   Spectrum: PowerLaw
372    Prefactor:  9.891e+00  1.234e+01  0.000e+00  1.000e+06 ( 1.000e-14)
373        Index:  2.290e+00  6.712e-01  0.000e+00  1.000e+01 (-1.000e+00)
374        Scale:  2.978e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
707    Prefactor:  7.826e-01  1.338e-01  0.000e+00  1.000e+01 ( 1.000e+00)
708        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
709        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
706   Normalization:  1.268e+00  1.105e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 3.18
Ra Dec: 182.114 61.356
Photon Index (Free Index): 2.29 +/- 0.67
Photon Flux (Free Index): 1.82e-08 +/- 1.90e-08
Energy Flux (Free Index): 7.00e-06 +/- 5.60e-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/35829803/cmap_HighResolution_723427201_724032001_4FGL_J1208.4+6121_weekly_bin801.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.86e-03', comment='SUCCESS', photon_flux='1.38e-08', energy_flux2='7.00e-06', photon_flux_error='1.06e-08', dlogl='5.52e-02', energy_flux='8.02e-06', photon_flux2='1.82e-08', job_status='DONE', time_completed='2023-12-12 01:54:51.151337', photon_index_error2='0.67', photon_index2='2.29', ts='3.08', fit_tolerance='1e-08', GAL='0.78', photon_index_error='0.00', photon_flux_upper_limit='3.79e-08', energy_flux_error2='5.60e-06', EG='1.27', time_epoch_completed='1702374891.15', return_code='0', job_id='35829803', GAL2='0.78', EG2='1.27', return_code2='0', energy_flux_error='6.18e-06', photon_flux_error2='1.90e-08', ts2='3.18', photon_index='2.07' WHERE bin_id='801' AND source_name='4FGL J1208.4+6121' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 12 01:54:51 PST 2023

