number of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2108.5+1434_weekly_bin780
RA = 317.148, Dec = 14.5812
tmin = 710726401, tmax = 711331201
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='19664518', job_status='RUN', time_executed='2023-07-18 01:52:17.089215', time_epoch_executed='1689670337.09' WHERE source_name='4FGL J2108.5+1434' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19664518

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19664518/ft1_4FGL_J2108.5+1434_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19664518/ft1_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19664518/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits ra=317.148 dec=14.5812 rad=12.0 tmin=710726401.0 tmax=711331201.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.62
user 3.57
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.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/19664518/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.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 1.13
user 0.20
sys 0.13

Number of photons that the gtmktime cut: 1925

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA"/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).

 outfile=/lscratch/kocevski/19664518/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 16.23
user 15.33
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19664518/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19664518/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19664518/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 62.82
user 58.01
sys 3.61

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
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 194 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2108.5+1434 @ 317.148 14.5812

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19664518/cmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.13
user 0.22
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19664518/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.19
user 0.23
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19664518/Model_4FGL_J2108.5+1434_weekly_bin780.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits.....................!
real 97.94
user 95.76
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits', '/lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits', expMap='/lscratch/kocevski/19664518/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', expCube='/lscratch/kocevski/19664518/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19664518/Model_4FGL_J2108.5+1434_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2108.5+1434'

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  4.876e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19664518/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19664518/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19664518/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19664518/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19664518/Model_4FGL_J2108.5+1434_weekly_bin780.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) = 20425.0880588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5744       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31825E-01   1.0000          .0000       .10000E+07
     3 'norm      '    .35066       1.0000          .0000       .10000E+07
     4 'Prefactor '    52.608       1.0000          .0000       .10000E+07
     5 'norm      '    9.4149       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.312       1.0000          .0000       .10000E+07
     7 'Prefactor '    .37806E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    36.125       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24810E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    12.157       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37426E-06   1.0000          .0000       .10000E+07
    12 'norm      '    5.3462       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35275E-01   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10625E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    30.380       1.0000          .0000       .10000E+07
    16 'norm      '    .61296       1.0000          .0000       .10000E+07
    17 'norm      '    1.1258       1.0000          .0000       .10000E+07
    18 'Prefactor '    50.506       1.0000          .0000       .10000E+07
    19 'Normalizat'    .58117       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0360       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20422.07     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      984 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5972        7.3380       -.89674E-07   -.46750E-03
   2  Prefactor     .39413E-08    51.675        .33552E-06** at limit **
   3  norm          .35206        .42309       -.52645E-07   -.22031E-01
   4  Prefactor     52.111        19.852       -.95674E-07   -.24838    
   5  norm          9.4423        5.6065       -.40382E-07    .35173E-02
   6  Prefactor     10.176        7.5615        .24651E-07    .10045    
   7  Prefactor     .50682E-07    9.5321       -.25247E-06** at limit **
   8  Prefactor     36.029        2.7280        .13108E-07    .41564E-01
   9  Prefactor     .93092E-07    6.4313        .10651E-06** at limit **
  10  Prefactor     12.131        11.486       -.16600E-06   -.20456E-01
  11  Prefactor     .35411E-06    6.0212       -.46092E-07** at limit **
  12  norm          5.3458        2.4804        .33305E-08   -.96985E-05
  13  Prefactor     .27811E-07    .99486       -.22308E-07** at limit **
  14  Prefactor     .44409E-09    3.3688        .18513E-06** at limit **
  15  Prefactor     31.275        33.329        .31271E-06   -.10580    
  16  norm          .61043        1.0549        .23733E-07    .22309E-02
  17  norm          1.1255        .97934       -.38019E-08   -.11676E-02
  18  Prefactor     50.552        2.4383       -.89677E-08   -.20232E-01
  19  Normalizat    .58172        .17515       -.20276E-05   -.17529E-03
  20  Prefactor     1.0360        .66940E-01    .41968E-06   -.45469E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.59717
  Prefactor  = 3.94129e-09
  norm       = 0.352061
  Prefactor  = 52.1114
  norm       = 9.44229
  Prefactor  = 10.1761
  Prefactor  = 5.06817e-08
  Prefactor  = 36.0294
  Prefactor  = 9.30922e-08
  Prefactor  = 12.1312
  Prefactor  = 3.54106e-07
  norm       = 5.3458
  Prefactor  = 2.78111e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 31.2747
  norm       = 0.610433
  norm       = 1.12546
  Prefactor  = 50.5519
  Normalizat = 0.581724
  Prefactor  = 1.03602
number of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2108.5+1434_weekly_bin780
RA = 317.148, Dec = 14.5812
tmin = 710726401, tmax = 711331201
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='19665378', job_status='RUN', time_executed='2023-07-18 01:57:17.088555', time_epoch_executed='1689670637.09' WHERE source_name='4FGL J2108.5+1434' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19665378

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19665378/ft1_4FGL_J2108.5+1434_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19665378/ft1_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665378/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits ra=317.148 dec=14.5812 rad=12.0 tmin=710726401.0 tmax=711331201.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.54
user 3.53
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.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/19665378/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.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 1.12
user 0.19
sys 0.13

Number of photons that the gtmktime cut: 1925

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA"number of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2108.5+1434_weekly_bin780
RA = 317.148, Dec = 14.5812
tmin = 710726401, tmax = 711331201
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='19665438', job_status='RUN', time_executed='2023-07-18 01:57:40.234027', time_epoch_executed='1689670660.23' WHERE source_name='4FGL J2108.5+1434' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19665438

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19665438/ft1_4FGL_J2108.5+1434_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19665438/ft1_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665438/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits ra=317.148 dec=14.5812 rad=12.0 tmin=710726401.0 tmax=711331201.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.62
user 3.50
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.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/19665438/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.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.93
user 0.19
sys 0.14

Number of photons that the gtmktime cut: 1925

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" **********
 **   18 **HESSE 
 **********

 FCN=   20422.07     FROM HESSE     STATUS=OK           347 CALLS     1331 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5972        8.3915        .47041E-03   -1.5665    
   2  Prefactor     .39413E-08    4.0785        .12942E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .35206        .48791        .95441E-03   -1.5696    
   4  Prefactor     52.111        33.842        .13788E-03   -1.5564    
   5  norm          9.4423        5.7721        .32637E-03   -1.5647    
   6  Prefactor     10.176        11.674        .31177E-03   -1.5644    
   7  Prefactor     .50682E-07    9.6812        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     36.029        12.462        .16640E-03   -1.5588    
   9  Prefactor     .93092E-07    8.2249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.131        11.547        .28705E-03   -1.5638    
  11  Prefactor     .35411E-06    8.5866        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.3458        2.4838        .43442E-03   -1.5662    
  13  Prefactor     .27811E-07    4.0583        .16184E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .44409E-09    3.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     31.275        38.787        .18145E-03   -1.5596    
  16  norm          .61043        1.1029        .68075E-03   -1.5692    
  17  norm          1.1255        1.0070        .11033E-02   -1.5687    
  18  Prefactor     50.552        19.723        .14072E-03   -1.5566    
  19  Normalizat    .58172        .17260        .11206       -1.0877    
  20  Prefactor     1.0360        .61415E-01    .40807E-01   -.91538    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19192e-06
Minuit parameter uncertainties:
  1  8.39156
  2  0.000252846
  3  0.487909
  4  33.8424
  5  5.77206
  6  11.6744
  7  0.00140075
  8  12.4625
  9  0.00175009
  10  11.5471
  11  0.00348734
  12  2.4838
  13  0.000671626
  14  7.81445e-05
  15  38.7871
  16  1.10294
  17  1.00696
  18  19.7226
  19  0.172755
  20  0.0614196
Done.

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

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.603e+01  1.246e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.036e+00  6.142e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  5.817e-01  1.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.99
Ra Dec: 317.148 14.581
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 1.32e-07 +/- 4.57e-08
Energy Flux (Fixed Index): 3.04e-05 +/- 1.05e-05

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) = 20415.4332864
delta logL = 6.6409836751

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20415.4077788
delta logL = 6.66649127104

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20415.41     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      272 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3959        9.9525        .54867E-03    .77045E-02
   2  Index         5.2079        2.0300        .11488        .35442E-03
   3  Normalizat    .44962        .60400E-01    .12643        .21360E-03
   4  Prefactor     1.0766        .23355E-01    .38551E-01    .14558E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39593
  Index      = 5.20788
  Normalizat = 0.449625
  Prefactor  = 1.0766
 **********
 **   18 **HESSE 
 **********

 FCN=   20415.41     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      305 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3959        11.800        .62006E-05   -1.5671    
   2  Index         5.2079        2.4965        .48035E-02    .41588E-01
   3  Normalizat    .44962        .16430        .56028E-03   -1.1481    
   4  Prefactor     1.0766        .62304E-01    .14412E-03   -.90218    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.09795e-07
Minuit parameter uncertainties:
  1  11.8005
  2  2.61419
  3  0.164474
  4  0.0623086
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) = 20415.407778
delta logL = 6.66649215023

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.396e+00  1.180e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  5.208e+00  2.614e+00  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.077e+00  6.231e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  4.496e-01  1.645e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 27.35
Ra Dec: 317.148 14.581
Photon Index (Free Index): 5.21 +/- 2.61
Photon Flux (Free Index): 2.10e-07 +/- 6.02e-08
Energy Flux (Free Index): 2.74e-05 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/19664518/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.32e-07', energy_flux2='2.74e-05', photon_flux_error='4.57e-08', dlogl='6.67e+00', energy_flux='3.04e-05', photon_flux2='2.10e-07', job_status='DONE', time_completed='2023-07-18 02:09:37.474792', photon_index_error2='2.61', photon_index2='5.21', ts='11.99', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.58', time_epoch_completed='1689671377.47', return_code='0', job_id='19664518', GAL2='1.08', EG2='0.45', return_code2='102', energy_flux_error='1.05e-05', photon_flux_error2='6.02e-08', ts2='27.35', photon_index='2.77' WHERE bin_id='780' AND source_name='4FGL J2108.5+1434' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:09:38 PDT 2023

 outfile=/lscratch/kocevski/19665378/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 16.18
user 15.09
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19665378/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665378/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665378/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 59.84
user 55.65
sys 3.28

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
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 194 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2108.5+1434 @ 317.148 14.5812

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665378/cmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.22
user 0.20
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665378/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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.94
user 0.22
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin outfile=/lscratch/kocevski/19665438/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 16.14
user 15.11
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19665438/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665438/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665438/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 60.05
user 55.60
sys 3.49

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
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 194 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2108.5+1434 @ 317.148 14.5812

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665438/cmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.16
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665438/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.15
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_binnumber of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2108.5+1434_weekly_bin780
RA = 317.148, Dec = 14.5812
tmin = 710726401, tmax = 711331201
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='19665905', job_status='RUN', time_executed='2023-07-18 02:00:04.428912', time_epoch_executed='1689670804.43' WHERE source_name='4FGL J2108.5+1434' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19665905

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19665905/ft1_4FGL_J2108.5+1434_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19665905/ft1_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665905/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits ra=317.148 dec=14.5812 rad=12.0 tmin=710726401.0 tmax=711331201.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.74
user 3.59
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.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/19665905/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.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 1.11
user 0.20
sys 0.14

Number of photons that the gtmktime cut: 1925

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" outfile=/lscratch/kocevski/19665905/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 16.41
user 15.44
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19665905/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665905/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19665905/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 60.85
user 55.87
sys 3.78

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
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 194 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2108.5+1434 @ 317.148 14.5812

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665905/cmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.21
user 0.22
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19665905/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.17
user 0.23
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19665378/Model_4FGL_J2108.5+1434_weekly_bin780.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits.....................!
real 92.00
user 90.10
sys 0.76

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits', '/lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits', expMap='/lscratch/kocevski/19665378/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', expCube='/lscratch/kocevski/19665378/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19665378/Model_4FGL_J2108.5+1434_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2108.5+1434'

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  4.876e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19665378/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19665378/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19665378/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19665378/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19665378/Model_4FGL_J2108.5+1434_weekly_bin780.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) = 20425.0880588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5744       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31825E-01   1.0000          .0000       .10000E+07
     3 'norm      '    .35066       1.0000          .0000       .10000E+07
     4 'Prefactor '    52.608       1.0000          .0000       .10000E+07
     5 'norm      '    9.4149       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.312       1.0000          .0000       .10000E+07
     7 'Prefactor '    .37806E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    36.125       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24810E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    12.157       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37426E-06   1.0000          .0000       .10000E+07
    12 'norm      '    5.3462       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35275E-01   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10625E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    30.380       1.0000          .0000       .10000E+07
    16 'norm      '    .61296       1.0000          .0000       .10000E+07
    17 'norm      '    1.1258       1.0000          .0000       .10000E+07
    18 'Prefactor '    50.506       1.0000          .0000       .10000E+07
    19 'Normalizat'    .58117       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0360       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19665438/Model_4FGL_J2108.5+1434_weekly_bin780.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits.....................!
real 92.89
user 90.38
sys 1.04

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits', '/lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits', expMap='/lscratch/kocevski/19665438/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', expCube='/lscratch/kocevski/19665438/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19665438/Model_4FGL_J2108.5+1434_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2108.5+1434'

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  4.876e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19665438/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19665438/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19665438/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19665438/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19665438/Model_4FGL_J2108.5+1434_weekly_bin780.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) = 20425.0880588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5744       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31825E-01   1.0000          .0000       .10000E+07
     3 'norm      '    .35066       1.0000          .0000       .10000E+07
     4 'Prefactor '    52.608       1.0000          .0000       .10000E+07
     5 'norm      '    9.4149       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.312       1.0000          .0000       .10000E+07
     7 'Prefactor '    .37806E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    36.125       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24810E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    12.157       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37426E-06   1.0000          .0000       .10000E+07
    12 'norm      '    5.3462       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35275E-01   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10625E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    30.380       1.0000          .0000       .10000E+07
    16 'norm      '    .61296       1.0000          .0000       .10000E+07
    17 'norm      '    1.1258       1.0000          .0000       .10000E+07
    18 'Prefactor '    50.506       1.0000          .0000       .10000E+07
    19 'Normalizat'    .58117       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0360       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20422.07     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      984 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5972        7.3380       -.89674E-07   -.46750E-03
   2  Prefactor     .39413E-08    51.675        .33552E-06** at limit **
   3  norm          .35206        .42309       -.52645E-07   -.22031E-01
   4  Prefactor     52.111        19.852       -.95674E-07   -.24838    
   5  norm          9.4423        5.6065       -.40382E-07    .35173E-02
   6  Prefactor     10.176        7.5615        .24651E-07    .10045    
   7  Prefactor     .50682E-07    9.5321       -.25247E-06** at limit **
   8  Prefactor     36.029        2.7280        .13108E-07    .41564E-01
   9  Prefactor     .93092E-07    6.4313        .10651E-06** at limit **
  10  Prefactor     12.131        11.486       -.16600E-06   -.20456E-01
  11  Prefactor     .35411E-06    6.0212       -.46092E-07** at limit **
  12  norm          5.3458        2.4804        .33305E-08   -.96985E-05
  13  Prefactor     .27811E-07    .99486       -.22308E-07** at limit **
  14  Prefactor     .44409E-09    3.3688        .18513E-06** at limit **
  15  Prefactor     31.275        33.329        .31271E-06   -.10580    
  16  norm          .61043        1.0549        .23733E-07    .22309E-02
  17  norm          1.1255        .97934       -.38019E-08   -.11676E-02
  18  Prefactor     50.552        2.4383       -.89677E-08   -.20232E-01
  19  Normalizat    .58172        .17515       -.20276E-05   -.17529E-03
  20  Prefactor     1.0360        .66940E-01    .41968E-06   -.45469E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.59717
  Prefactor  = 3.94129e-09
  norm       = 0.352061
  Prefactor  = 52.1114
  norm       = 9.44229
  Prefactor  = 10.1761
  Prefactor  = 5.06817e-08
  Prefactor  = 36.0294
  Prefactor  = 9.30922e-08
  Prefactor  = 12.1312
  Prefactor  = 3.54106e-07
  norm       = 5.3458
  Prefactor  = 2.78111e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 31.2747
  norm       = 0.610433
  norm       = 1.12546
  Prefactor  = 50.5519
  Normalizat = 0.581724
  Prefactor  = 1.03602
**   17 **MINIMIZE    .6640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20422.07     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      984 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5972        7.3380       -.89674E-07   -.46750E-03
   2  Prefactor     .39413E-08    51.675        .33552E-06** at limit **
   3  norm          .35206        .42309       -.52645E-07   -.22031E-01
   4  Prefactor     52.111        19.852       -.95674E-07   -.24838    
   5  norm          9.4423        5.6065       -.40382E-07    .35173E-02
   6  Prefactor     10.176        7.5615        .24651E-07    .10045    
   7  Prefactor     .50682E-07    9.5321       -.25247E-06** at limit **
   8  Prefactor     36.029        2.7280        .13108E-07    .41564E-01
   9  Prefactor     .93092E-07    6.4313        .10651E-06** at limit **
  10  Prefactor     12.131        11.486       -.16600E-06   -.20456E-01
  11  Prefactor     .35411E-06    6.0212       -.46092E-07** at limit **
  12  norm          5.3458        2.4804        .33305E-08   -.96985E-05
  13  Prefactor     .27811E-07    .99486       -.22308E-07** at limit **
  14  Prefactor     .44409E-09    3.3688        .18513E-06** at limit **
  15  Prefactor     31.275        33.329        .31271E-06   -.10580    
  16  norm          .61043        1.0549        .23733E-07    .22309E-02
  17  norm          1.1255        .97934       -.38019E-08   -.11676E-02
  18  Prefactor     50.552        2.4383       -.89677E-08   -.20232E-01
  19  Normalizat    .58172        .17515       -.20276E-05   -.17529E-03
  20  Prefactor     1.0360        .66940E-01    .41968E-06   -.45469E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.59717
  Prefactor  = 3.94129e-09
  norm       = 0.352061
  Prefactor  = 52.1114
  norm       = 9.44229
  Prefactor  = 10.1761
  Prefactor  = 5.06817e-08
  Prefactor  = 36.0294
  Prefactor  = 9.30922e-08
  Prefactor  = 12.1312
  Prefactor  = 3.54106e-07
  norm       = 5.3458
  Prefactor  = 2.78111e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 31.2747
  norm       = 0.610433
  norm       = 1.12546
  Prefactor  = 50.5519
  Normalizat = 0.581724
  Prefactor  = 1.03602
 **********
 **   18 **HESSE 
 **********

 FCN=   20422.07     FROM HESSE     STATUS=OK           347 CALLS     1331 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5972        8.3915        .47041E-03   -1.5665    
   2  Prefactor     .39413E-08    4.0785        .12942E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .35206        .48791        .95441E-03   -1.5696    
   4  Prefactor     52.111        33.842        .13788E-03   -1.5564    
   5  norm          9.4423        5.7721        .32637E-03   -1.5647    
   6  Prefactor     10.176        11.674        .31177E-03   -1.5644    
   7  Prefactor     .50682E-07    9.6812        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     36.029        12.462        .16640E-03   -1.5588    
   9  Prefactor     .93092E-07    8.2249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.131        11.547        .28705E-03   -1.5638    
  11  Prefactor     .35411E-06    8.5866        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.3458        2.4838        .43442E-03   -1.5662    
  13  Prefactor     .27811E-07    4.0583        .16184E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .44409E-09    3.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     31.275        38.787        .18145E-03   -1.5596    
  16  norm          .61043        1.1029        .68075E-03   -1.5692    
  17  norm          1.1255        1.0070        .11033E-02   -1.5687    
  18  Prefactor     50.552        19.723        .14072E-03   -1.5566    
  19  Normalizat    .58172        .17260        .11206       -1.0877    
  20  Prefactor     1.0360        .61415E-01    .40807E-01   -.91538    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19192e-06
Minuit parameter uncertainties:
  1  8.39156
  2  0.000252846
  3  0.487909
  4  33.8424
  5  5.77206
  6  11.6744
  7  0.00140075
  8  12.4625
  9  0.00175009
  10  11.5471
  11  0.00348734
  12  2.4838
  13  0.000671626
  14  7.81445e-05
  15  38.7871
  16  1.10294
  17  1.00696
  18  19.7226
  19  0.172755
  20  0.0614196
 **********
 **   18 **HESSE 
 **********

 FCN=   20422.07     FROM HESSE     STATUS=OK           347 CALLS     1331 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5972        8.3915        .47041E-03   -1.5665    
   2  Prefactor     .39413E-08    4.0785        .12942E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .35206        .48791        .95441E-03   -1.5696    
   4  Prefactor     52.111        33.842        .13788E-03   -1.5564    
   5  norm          9.4423        5.7721        .32637E-03   -1.5647    
   6  Prefactor     10.176        11.674        .31177E-03   -1.5644    
   7  Prefactor     .50682E-07    9.6812        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     36.029        12.462        .16640E-03   -1.5588    
   9  Prefactor     .93092E-07    8.2249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.131        11.547        .28705E-03   -1.5638    
  11  Prefactor     .35411E-06    8.5866        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.3458        2.4838        .43442E-03   -1.5662    
  13  Prefactor     .27811E-07    4.0583        .16184E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .44409E-09    3.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     31.275        38.787        .18145E-03   -1.5596    
  16  norm          .61043        1.1029        .68075E-03   -1.5692    
  17  norm          1.1255        1.0070        .11033E-02   -1.5687    
  18  Prefactor     50.552        19.723        .14072E-03   -1.5566    
  19  Normalizat    .58172        .17260        .11206       -1.0877    
  20  Prefactor     1.0360        .61415E-01    .40807E-01   -.91538    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19192e-06
Minuit parameter uncertainties:
  1  8.39156
  2  0.000252846
  3  0.487909
  4  33.8424
  5  5.77206
  6  11.6744
  7  0.00140075
  8  12.4625
  9  0.00175009
  10  11.5471
  11  0.00348734
  12  2.4838
  13  0.000671626
  14  7.81445e-05
  15  38.7871
  16  1.10294
  17  1.00696
  18  19.7226
  19  0.172755
  20  0.0614196
Done.

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

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.603e+01  1.246e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.036e+00  6.142e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  5.817e-01  1.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.99
Ra Dec: 317.148 14.581
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 1.32e-07 +/- 4.57e-08
Energy Flux (Fixed Index): 3.04e-05 +/- 1.05e-05

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) = 20415.4332864
delta logL = 6.6409836751

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20415.4077788
delta logL = 6.66649127104

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20415.41     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      272 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3959        9.9525        .54867E-03    .77045E-02
   2  Index         5.2079        2.0300        .11488        .35442E-03
   3  Normalizat    .44962        .60400E-01    .12643        .21360E-03
   4  Prefactor     1.0766        .23355E-01    .38551E-01    .14558E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39593
  Index      = 5.20788
  Normalizat = 0.449625
  Prefactor  = 1.0766
number of points = 17189
number of fields = 31
RA_SUN column already exists. File will not be modified.
 **********
 **   18 **HESSE 
 **********

 FCN=   20415.41     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      305 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3959        11.800        .62006E-05   -1.5671    
   2  Index         5.2079        2.4965        .48035E-02    .41588E-01
   3  Normalizat    .44962        .16430        .56028E-03   -1.1481    
   4  Prefactor     1.0766        .62304E-01    .14412E-03   -.90218    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.09795e-07
Minuit parameter uncertainties:
  1  11.8005
  2  2.61419
  3  0.164474
  4  0.0623086
Done.


Performing analysis on: 4FGL_J2108.5+1434_weekly_bin780
RA = 317.148, Dec = 14.5812
tmin = 710726401, tmax = 711331201
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='19666510', job_status='RUN', time_executed='2023-07-18 02:03:24.388349', time_epoch_executed='1689671004.39' WHERE source_name='4FGL J2108.5+1434' and cadence='weekly' and bin_id='780'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/19666510

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

Retrieving the FT1 file...

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

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

Retrieving 106 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/19666510/ft1_4FGL_J2108.5+1434_weekly_bin780.fits


Retrieving the FT1 file...

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

Retrieving 106 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/19666510/ft1_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19666510/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits ra=317.148 dec=14.5812 rad=12.0 tmin=710726401.0 tmax=711331201.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.54
user 3.56
sys 0.31

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.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/19666510/ft1_filteredMKT_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" outfile="/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.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 1.08
user 0.20
sys 0.14

Number of photons that the gtmktime cut: 1925

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits" evtable="EVENTS" scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA"Done.

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

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.603e+01  1.246e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.036e+00  6.142e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  5.817e-01  1.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.99
Ra Dec: 317.148 14.581
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 1.32e-07 +/- 4.57e-08
Energy Flux (Fixed Index): 3.04e-05 +/- 1.05e-05

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) = 20415.4332864
delta logL = 6.6409836751

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20415.4077788
delta logL = 6.66649127104

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20415.41     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      272 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3959        9.9525        .54867E-03    .77045E-02
   2  Index         5.2079        2.0300        .11488        .35442E-03
   3  Normalizat    .44962        .60400E-01    .12643        .21360E-03
   4  Prefactor     1.0766        .23355E-01    .38551E-01    .14558E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39593
  Index      = 5.20788
  Normalizat = 0.449625
  Prefactor  = 1.0766
 **********
 **   18 **HESSE 
 **********

 FCN=   20415.41     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      305 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3959        11.800        .62006E-05   -1.5671    
   2  Index         5.2079        2.4965        .48035E-02    .41588E-01
   3  Normalizat    .44962        .16430        .56028E-03   -1.1481    
   4  Prefactor     1.0766        .62304E-01    .14412E-03   -.90218    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.09795e-07
Minuit parameter uncertainties:
  1  11.8005
  2  2.61419
  3  0.164474
  4  0.0623086
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) = 20415.407778
delta logL = 6.66649215023

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.396e+00  1.180e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  5.208e+00  2.614e+00  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.077e+00  6.231e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  4.496e-01  1.645e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 27.35
Ra Dec: 317.148 14.581
Photon Index (Free Index): 5.21 +/- 2.61
Photon Flux (Free Index): 2.10e-07 +/- 6.02e-08
Energy Flux (Free Index): 2.74e-05 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/19665378/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.32e-07', energy_flux2='2.74e-05', photon_flux_error='4.57e-08', dlogl='6.67e+00', energy_flux='3.04e-05', photon_flux2='2.10e-07', job_status='DONE', time_completed='2023-07-18 02:15:04.885148', photon_index_error2='2.61', photon_index2='5.21', ts='11.99', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.58', time_epoch_completed='1689671704.89', return_code='0', job_id='19665378', GAL2='1.08', EG2='0.45', return_code2='102', energy_flux_error='1.05e-05', photon_flux_error2='6.02e-08', ts2='27.35', photon_index='2.77' WHERE bin_id='780' AND source_name='4FGL J2108.5+1434' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:15:05 PDT 2023

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) = 20415.407778
delta logL = 6.66649215023

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.396e+00  1.180e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  5.208e+00  2.614e+00  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.077e+00  6.231e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  4.496e-01  1.645e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 27.35
Ra Dec: 317.148 14.581
Photon Index (Free Index): 5.21 +/- 2.61
Photon Flux (Free Index): 2.10e-07 +/- 6.02e-08
Energy Flux (Free Index): 2.74e-05 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/19665438/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.32e-07', energy_flux2='2.74e-05', photon_flux_error='4.57e-08', dlogl='6.67e+00', energy_flux='3.04e-05', photon_flux2='2.10e-07', job_status='DONE', time_completed='2023-07-18 02:15:08.590239', photon_index_error2='2.61', photon_index2='5.21', ts='11.99', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.58', time_epoch_completed='1689671708.59', return_code='0', job_id='19665438', GAL2='1.08', EG2='0.45', return_code2='102', energy_flux_error='1.05e-05', photon_flux_error2='6.02e-08', ts2='27.35', photon_index='2.77' WHERE bin_id='780' AND source_name='4FGL J2108.5+1434' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:15:09 PDT 2023

780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19665905/Model_4FGL_J2108.5+1434_weekly_bin780.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits.....................!
real 93.09
user 90.79
sys 0.93

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits', '/lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits', expMap='/lscratch/kocevski/19665905/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', expCube='/lscratch/kocevski/19665905/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19665905/Model_4FGL_J2108.5+1434_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2108.5+1434'

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  4.876e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19665905/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19665905/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19665905/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19665905/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19665905/Model_4FGL_J2108.5+1434_weekly_bin780.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) = 20425.0880588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5744       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31825E-01   1.0000          .0000       .10000E+07
     3 'norm      '    .35066       1.0000          .0000       .10000E+07
     4 'Prefactor '    52.608       1.0000          .0000       .10000E+07
     5 'norm      '    9.4149       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.312       1.0000          .0000       .10000E+07
     7 'Prefactor '    .37806E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    36.125       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24810E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    12.157       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37426E-06   1.0000          .0000       .10000E+07
    12 'norm      '    5.3462       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35275E-01   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10625E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    30.380       1.0000          .0000       .10000E+07
    16 'norm      '    .61296       1.0000          .0000       .10000E+07
    17 'norm      '    1.1258       1.0000          .0000       .10000E+07
    18 'Prefactor '    50.506       1.0000          .0000       .10000E+07
    19 'Normalizat'    .58117       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0360       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
  outfile=/lscratch/kocevski/19666510/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 16.02
user 15.16
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits sctable="SC_DATA" expcube=/lscratch/kocevski/19666510/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19666510/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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/19666510/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
.....................!
real 60.15
user 55.46
sys 3.53

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
Extended source Cygnus Loop in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 194 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J2108.5+1434 @ 317.148 14.5812

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19666510/cmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.08
user 0.21
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits outfile=/lscratch/kocevski/19666510/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.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=317.148 yref=14.5812 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 1.30
user 0.22
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits evtable="EVENTS" scfile=/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin**   17 **MINIMIZE    .6640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20422.07     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      984 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5972        7.3380       -.89674E-07   -.46750E-03
   2  Prefactor     .39413E-08    51.675        .33552E-06** at limit **
   3  norm          .35206        .42309       -.52645E-07   -.22031E-01
   4  Prefactor     52.111        19.852       -.95674E-07   -.24838    
   5  norm          9.4423        5.6065       -.40382E-07    .35173E-02
   6  Prefactor     10.176        7.5615        .24651E-07    .10045    
   7  Prefactor     .50682E-07    9.5321       -.25247E-06** at limit **
   8  Prefactor     36.029        2.7280        .13108E-07    .41564E-01
   9  Prefactor     .93092E-07    6.4313        .10651E-06** at limit **
  10  Prefactor     12.131        11.486       -.16600E-06   -.20456E-01
  11  Prefactor     .35411E-06    6.0212       -.46092E-07** at limit **
  12  norm          5.3458        2.4804        .33305E-08   -.96985E-05
  13  Prefactor     .27811E-07    .99486       -.22308E-07** at limit **
  14  Prefactor     .44409E-09    3.3688        .18513E-06** at limit **
  15  Prefactor     31.275        33.329        .31271E-06   -.10580    
  16  norm          .61043        1.0549        .23733E-07    .22309E-02
  17  norm          1.1255        .97934       -.38019E-08   -.11676E-02
  18  Prefactor     50.552        2.4383       -.89677E-08   -.20232E-01
  19  Normalizat    .58172        .17515       -.20276E-05   -.17529E-03
  20  Prefactor     1.0360        .66940E-01    .41968E-06   -.45469E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.59717
  Prefactor  = 3.94129e-09
  norm       = 0.352061
  Prefactor  = 52.1114
  norm       = 9.44229
  Prefactor  = 10.1761
  Prefactor  = 5.06817e-08
  Prefactor  = 36.0294
  Prefactor  = 9.30922e-08
  Prefactor  = 12.1312
  Prefactor  = 3.54106e-07
  norm       = 5.3458
  Prefactor  = 2.78111e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 31.2747
  norm       = 0.610433
  norm       = 1.12546
  Prefactor  = 50.5519
  Normalizat = 0.581724
  Prefactor  = 1.03602
 **********
 **   18 **HESSE 
 **********

 FCN=   20422.07     FROM HESSE     STATUS=OK           347 CALLS     1331 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5972        8.3915        .47041E-03   -1.5665    
   2  Prefactor     .39413E-08    4.0785        .12942E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .35206        .48791        .95441E-03   -1.5696    
   4  Prefactor     52.111        33.842        .13788E-03   -1.5564    
   5  norm          9.4423        5.7721        .32637E-03   -1.5647    
   6  Prefactor     10.176        11.674        .31177E-03   -1.5644    
   7  Prefactor     .50682E-07    9.6812        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     36.029        12.462        .16640E-03   -1.5588    
   9  Prefactor     .93092E-07    8.2249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.131        11.547        .28705E-03   -1.5638    
  11  Prefactor     .35411E-06    8.5866        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.3458        2.4838        .43442E-03   -1.5662    
  13  Prefactor     .27811E-07    4.0583        .16184E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .44409E-09    3.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     31.275        38.787        .18145E-03   -1.5596    
  16  norm          .61043        1.1029        .68075E-03   -1.5692    
  17  norm          1.1255        1.0070        .11033E-02   -1.5687    
  18  Prefactor     50.552        19.723        .14072E-03   -1.5566    
  19  Normalizat    .58172        .17260        .11206       -1.0877    
  20  Prefactor     1.0360        .61415E-01    .40807E-01   -.91538    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19192e-06
Minuit parameter uncertainties:
  1  8.39156
  2  0.000252846
  3  0.487909
  4  33.8424
  5  5.77206
  6  11.6744
  7  0.00140075
  8  12.4625
  9  0.00175009
  10  11.5471
  11  0.00348734
  12  2.4838
  13  0.000671626
  14  7.81445e-05
  15  38.7871
  16  1.10294
  17  1.00696
  18  19.7226
  19  0.172755
  20  0.0614196
Done.

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

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.603e+01  1.246e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.036e+00  6.142e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  5.817e-01  1.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.99
Ra Dec: 317.148 14.581
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 1.32e-07 +/- 4.57e-08
Energy Flux (Fixed Index): 3.04e-05 +/- 1.05e-05

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) = 20415.4332864
delta logL = 6.6409836751

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20415.4077788
delta logL = 6.66649127104

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20415.41     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      272 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3959        9.9525        .54867E-03    .77045E-02
   2  Index         5.2079        2.0300        .11488        .35442E-03
   3  Normalizat    .44962        .60400E-01    .12643        .21360E-03
   4  Prefactor     1.0766        .23355E-01    .38551E-01    .14558E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39593
  Index      = 5.20788
  Normalizat = 0.449625
  Prefactor  = 1.0766
 **********
 **   18 **HESSE 
 **********

 FCN=   20415.41     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      305 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3959        11.800        .62006E-05   -1.5671    
   2  Index         5.2079        2.4965        .48035E-02    .41588E-01
   3  Normalizat    .44962        .16430        .56028E-03   -1.1481    
   4  Prefactor     1.0766        .62304E-01    .14412E-03   -.90218    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.09795e-07
Minuit parameter uncertainties:
  1  11.8005
  2  2.61419
  3  0.164474
  4  0.0623086
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) = 20415.407778
delta logL = 6.66649215023

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.396e+00  1.180e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  5.208e+00  2.614e+00  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.077e+00  6.231e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  4.496e-01  1.645e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 27.35
Ra Dec: 317.148 14.581
Photon Index (Free Index): 5.21 +/- 2.61
Photon Flux (Free Index): 2.10e-07 +/- 6.02e-08
Energy Flux (Free Index): 2.74e-05 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/19665905/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.32e-07', energy_flux2='2.74e-05', photon_flux_error='4.57e-08', dlogl='6.67e+00', energy_flux='3.04e-05', photon_flux2='2.10e-07', job_status='DONE', time_completed='2023-07-18 02:17:49.452894', photon_index_error2='2.61', photon_index2='5.21', ts='11.99', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.58', time_epoch_completed='1689671869.45', return_code='0', job_id='19665905', GAL2='1.08', EG2='0.45', return_code2='102', energy_flux_error='1.05e-05', photon_flux_error2='6.02e-08', ts2='27.35', photon_index='2.77' WHERE bin_id='780' AND source_name='4FGL J2108.5+1434' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:17:50 PDT 2023

780.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/19666510/Model_4FGL_J2108.5+1434_weekly_bin780.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 Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits.....................!
real 92.52
user 90.14
sys 0.96

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits', '/lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits', expMap='/lscratch/kocevski/19666510/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', expCube='/lscratch/kocevski/19666510/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/19666510/Model_4FGL_J2108.5+1434_weekly_bin780.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2108.5+1434'

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  4.876e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/19666510/ft1_filtered_4FGL_J2108.5+1434_weekly_bin780.fits
Spacecraft file(s): /lscratch/kocevski/19666510/ft2_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure map: /lscratch/kocevski/19666510/expmap_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
Exposure cube: /lscratch/kocevski/19666510/ltcube_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/19666510/Model_4FGL_J2108.5+1434_weekly_bin780.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) = 20425.0880588

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    4.5744       1.0000          .0000       .10000E+07
     2 'Prefactor '    .31825E-01   1.0000          .0000       .10000E+07
     3 'norm      '    .35066       1.0000          .0000       .10000E+07
     4 'Prefactor '    52.608       1.0000          .0000       .10000E+07
     5 'norm      '    9.4149       1.0000          .0000       .10000E+07
     6 'Prefactor '    10.312       1.0000          .0000       .10000E+07
     7 'Prefactor '    .37806E-03   1.0000          .0000       .10000E+07
     8 'Prefactor '    36.125       1.0000          .0000       .10000E+07
     9 'Prefactor '    .24810E-04   1.0000          .0000       .10000E+07
    10 'Prefactor '    12.157       1.0000          .0000       .10000E+07
    11 'Prefactor '    .37426E-06   1.0000          .0000       .10000E+07
    12 'norm      '    5.3462       1.0000          .0000       .10000E+07
    13 'Prefactor '    .35275E-01   1.0000          .0000       .10000E+07
    14 'Prefactor '    .10625E-06   1.0000          .0000       .10000E+07
    15 'Prefactor '    30.380       1.0000          .0000       .10000E+07
    16 'norm      '    .61296       1.0000          .0000       .10000E+07
    17 'norm      '    1.1258       1.0000          .0000       .10000E+07
    18 'Prefactor '    50.506       1.0000          .0000       .10000E+07
    19 'Normalizat'    .58117       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.0360       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6640E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20422.07     FROM MIGRAD    STATUS=CONVERGED    121 CALLS      984 TOTAL
                     EDM=   .18E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     4.5972        7.3380       -.89674E-07   -.46750E-03
   2  Prefactor     .39413E-08    51.675        .33552E-06** at limit **
   3  norm          .35206        .42309       -.52645E-07   -.22031E-01
   4  Prefactor     52.111        19.852       -.95674E-07   -.24838    
   5  norm          9.4423        5.6065       -.40382E-07    .35173E-02
   6  Prefactor     10.176        7.5615        .24651E-07    .10045    
   7  Prefactor     .50682E-07    9.5321       -.25247E-06** at limit **
   8  Prefactor     36.029        2.7280        .13108E-07    .41564E-01
   9  Prefactor     .93092E-07    6.4313        .10651E-06** at limit **
  10  Prefactor     12.131        11.486       -.16600E-06   -.20456E-01
  11  Prefactor     .35411E-06    6.0212       -.46092E-07** at limit **
  12  norm          5.3458        2.4804        .33305E-08   -.96985E-05
  13  Prefactor     .27811E-07    .99486       -.22308E-07** at limit **
  14  Prefactor     .44409E-09    3.3688        .18513E-06** at limit **
  15  Prefactor     31.275        33.329        .31271E-06   -.10580    
  16  norm          .61043        1.0549        .23733E-07    .22309E-02
  17  norm          1.1255        .97934       -.38019E-08   -.11676E-02
  18  Prefactor     50.552        2.4383       -.89677E-08   -.20232E-01
  19  Normalizat    .58172        .17515       -.20276E-05   -.17529E-03
  20  Prefactor     1.0360        .66940E-01    .41968E-06   -.45469E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 4.59717
  Prefactor  = 3.94129e-09
  norm       = 0.352061
  Prefactor  = 52.1114
  norm       = 9.44229
  Prefactor  = 10.1761
  Prefactor  = 5.06817e-08
  Prefactor  = 36.0294
  Prefactor  = 9.30922e-08
  Prefactor  = 12.1312
  Prefactor  = 3.54106e-07
  norm       = 5.3458
  Prefactor  = 2.78111e-08
  Prefactor  = 4.44089e-10
  Prefactor  = 31.2747
  norm       = 0.610433
  norm       = 1.12546
  Prefactor  = 50.5519
  Normalizat = 0.581724
  Prefactor  = 1.03602
 **********
 **   18 **HESSE 
 **********

 FCN=   20422.07     FROM HESSE     STATUS=OK           347 CALLS     1331 TOTAL
                     EDM=   .22E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     4.5972        8.3915        .47041E-03   -1.5665    
   2  Prefactor     .39413E-08    4.0785        .12942E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .35206        .48791        .95441E-03   -1.5696    
   4  Prefactor     52.111        33.842        .13788E-03   -1.5564    
   5  norm          9.4423        5.7721        .32637E-03   -1.5647    
   6  Prefactor     10.176        11.674        .31177E-03   -1.5644    
   7  Prefactor     .50682E-07    9.6812        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     36.029        12.462        .16640E-03   -1.5588    
   9  Prefactor     .93092E-07    8.2249        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     12.131        11.547        .28705E-03   -1.5638    
  11  Prefactor     .35411E-06    8.5866        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          5.3458        2.4838        .43442E-03   -1.5662    
  13  Prefactor     .27811E-07    4.0583        .16184E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .44409E-09    3.3280        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     31.275        38.787        .18145E-03   -1.5596    
  16  norm          .61043        1.1029        .68075E-03   -1.5692    
  17  norm          1.1255        1.0070        .11033E-02   -1.5687    
  18  Prefactor     50.552        19.723        .14072E-03   -1.5566    
  19  Normalizat    .58172        .17260        .11206       -1.0877    
  20  Prefactor     1.0360        .61415E-01    .40807E-01   -.91538    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.19192e-06
Minuit parameter uncertainties:
  1  8.39156
  2  0.000252846
  3  0.487909
  4  33.8424
  5  5.77206
  6  11.6744
  7  0.00140075
  8  12.4625
  9  0.00175009
  10  11.5471
  11  0.00348734
  12  2.4838
  13  0.000671626
  14  7.81445e-05
  15  38.7871
  16  1.10294
  17  1.00696
  18  19.7226
  19  0.172755
  20  0.0614196
Done.

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

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.603e+01  1.246e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  2.765e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.036e+00  6.142e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  5.817e-01  1.728e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 11.99
Ra Dec: 317.148 14.581
Photon Index (Fixed Index): 2.77 +/- 0.00
Photon Flux (Fixed Index): 1.32e-07 +/- 4.57e-08
Energy Flux (Fixed Index): 3.04e-05 +/- 1.05e-05

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) = 20415.4332864
delta logL = 6.6409836751

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 20415.4077788
delta logL = 6.66649127104

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20415.41     FROM MIGRAD    STATUS=CONVERGED     57 CALLS      272 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     3.3959        9.9525        .54867E-03    .77045E-02
   2  Index         5.2079        2.0300        .11488        .35442E-03
   3  Normalizat    .44962        .60400E-01    .12643        .21360E-03
   4  Prefactor     1.0766        .23355E-01    .38551E-01    .14558E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 3.39593
  Index      = 5.20788
  Normalizat = 0.449625
  Prefactor  = 1.0766
 **********
 **   18 **HESSE 
 **********

 FCN=   20415.41     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      305 TOTAL
                     EDM=   .61E-06    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     3.3959        11.800        .62006E-05   -1.5671    
   2  Index         5.2079        2.4965        .48035E-02    .41588E-01
   3  Normalizat    .44962        .16430        .56028E-03   -1.1481    
   4  Prefactor     1.0766        .62304E-01    .14412E-03   -.90218    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 6.09795e-07
Minuit parameter uncertainties:
  1  11.8005
  2  2.61419
  3  0.164474
  4  0.0623086
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) = 20415.407778
delta logL = 6.66649215023

Extracting fit parameters...

4FGL J2108.5+1434
   Spectrum: PowerLaw
376    Prefactor:  3.396e+00  1.180e+01  0.000e+00  1.000e+06 ( 1.000e-12)
377        Index:  5.208e+00  2.614e+00  0.000e+00  1.000e+01 (-1.000e+00)
378        Scale:  4.520e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
661    Prefactor:  1.077e+00  6.231e-02  0.000e+00  1.000e+01 ( 1.000e+00)
662        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
663        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
660   Normalization:  4.496e-01  1.645e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 27.35
Ra Dec: 317.148 14.581
Photon Index (Free Index): 5.21 +/- 2.61
Photon Flux (Free Index): 2.10e-07 +/- 6.02e-08
Energy Flux (Free Index): 2.74e-05 +/- 1.15e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /lscratch/kocevski/19666510/cmap_HighResolution_710726401_711331201_4FGL_J2108.5+1434_weekly_bin780.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.32e-07', energy_flux2='2.74e-05', photon_flux_error='4.57e-08', dlogl='6.67e+00', energy_flux='3.04e-05', photon_flux2='2.10e-07', job_status='DONE', time_completed='2023-07-18 02:21:25.669127', photon_index_error2='2.61', photon_index2='5.21', ts='11.99', fit_tolerance='1e-08', GAL='1.04', photon_index_error='0.00', energy_flux_error2='1.15e-05', EG='0.58', time_epoch_completed='1689672085.67', return_code='0', job_id='19666510', GAL2='1.08', EG2='0.45', return_code2='102', energy_flux_error='1.05e-05', photon_flux_error2='6.02e-08', ts2='27.35', photon_index='2.77' WHERE bin_id='780' AND source_name='4FGL J2108.5+1434' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Jul 18 02:21:26 PDT 2023

