/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
/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)

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).


WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

Run: [FATAL] Invalid address:  (source)
number of points = 17365
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0719.3+3307_weekly_bin821
RA = 109.84, Dec = 33.1232
tmin = 735523201, tmax = 736128001
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='45347118', job_status='RUN', time_executed='2024-04-30 02:02:28.957138', time_epoch_executed='1714467748.96' WHERE source_name='4FGL J0719.3+3307' and cadence='weekly' and bin_id='821'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/45347118

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/45347118/ft1_4FGL_J0719.3+3307_weekly_bin821.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/45347118/ft1_4FGL_J0719.3+3307_weekly_bin821.fits outfile=/lscratch/kocevski/45347118/ft1_filteredMKT_4FGL_J0719.3+3307_weekly_bin821.fits ra=109.84 dec=33.1232 rad=12.0 tmin=735523201.0 tmax=736128001.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 6.15
user 4.80
sys 0.22

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.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/45347118/ft1_filteredMKT_4FGL_J0719.3+3307_weekly_bin821.fits evtable="EVENTS" outfile="/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.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.40
user 0.20
sys 0.14

Number of photons that the gtmktime cut: 1924

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits" evtable="EVENTS" scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits sctable="SC_DATA" oDone.


Performing analysis on: 4FGL_J0719.3+3307_weekly_bin821
RA = 109.84, Dec = 33.1232
tmin = 735523201, tmax = 736128001
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='45347155', job_status='RUN', time_executed='2024-04-30 02:02:27.636203', time_epoch_executed='1714467747.64' WHERE source_name='4FGL J0719.3+3307' and cadence='weekly' and bin_id='821'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/45347155

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

[Errno 2] No such file or directory: '/lscratch/kocevski/45347155/gll_ph_p305_r0736054876_v001.fit'
Traceback (most recent call last):
  File "/sdf/group/fermi/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py", line 2860, in sourceAnalysis
    dataAvailibility_ft1 = dataCatalogQuery(FT1_options, verbose=verbose)
  File "/sdf/group/fermi/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py", line 1962, in dataCatalogQuery
    FTmerge.ft1merge(dataCatalogFiles_local, mergedFile, verbose=verbose)
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/FTmerge.py", line 59, in ft1merge
    tstart, tstop = _getTimeKeywords(infiles)
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/FTmerge.py", line 40, in _getTimeKeywords
    header = pyfits.open(item)[extnum].header
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 148, in fitsopen
    lazy_load_hdus, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 402, in fromfile
    lazy_load_hdus=lazy_load_hdus, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/hdu/hdulist.py", line 1006, in _readfrom
    fileobj = _File(fileobj, mode=mode, memmap=memmap, cache=cache)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/utils/decorators.py", line 522, in wrapper
    return function(*args, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/file.py", line 150, in __init__
    self._open_filename(fileobj, mode, overwrite)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/file.py", line 506, in _open_filename
    self._file = fileobj_open(self.name, IO_FITS_MODES[mode])
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/astropy/io/fits/util.py", line 395, in fileobj_open
    return open(filename, mode)
IOError: [Errno 2] No such file or directory: '/lscratch/kocevski/45347155/gll_ph_p305_r0736054876_v001.fit'


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/45347155/ft2_4FGL_J0719.3+3307_weekly_bin821.fits


UPDATE lightcurve_data_v2 Sshell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
ET job_status='FAIL', comment='No available data', time_epoch_completed='1714468120.88', time_completed='2024-04-30 02:08:40.884146', job_id='45347155' WHERE bin_id='821' AND source_name='4FGL J0719.3+3307' AND cadence='weekly';

Database successfully updated.

Error: could not find cmap file: /lscratch/kocevski/45347155/cmap_HighResolution_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits
Continuing... 

Cleaning up...

** Nuclear option initiated! **


Analysis Complete.


Tue Apr 30 02:08:42 PDT 2024

utfile=/lscratch/kocevski/45347118/ltcube_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.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/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits
.....................!
real 20.30
user 18.81
sys 0.24

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits evtable="EVENTS" scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits sctable="SC_DATA" expcube=/lscratch/kocevski/45347118/ltcube_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits outfile=/lscratch/kocevski/45347118/expmap_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.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/45347118/ltcube_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits
.....................!
real 70.49
user 66.12
sys 4.00

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 IC 443 in ROI with RadialGaussian spatial model.
Extended source S 147 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/S147.fits is the correct path to the extended template.
Added 183 point sources and 2 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 J0719.3+3307 @ 109.84 33.1232

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits outfile=/lscratch/kocevski/45347118/cmap_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.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=109.84 yref=33.1232 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.44
user 0.23
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits outfile=/lscratch/kocevski/45347118/cmap_HighResolution_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.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=109.84 yref=33.1232 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.47
user 0.24
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits evtable="EVENTS" scfile=/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/45347118/Model_4FGL_J0719.3+3307_weekly_bin821.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

WARNING: version mismatch between CFITSIO header (v3.43) and linked library (v3.41).

adding source EG_v02
adding source GAL_V02
adding source IC 443
adding source S 147
Working on...
/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits.....................!
real 128.43
user 126.82
sys 0.95

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits', '/lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits', expMap='/lscratch/kocevski/45347118/expmap_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits', expCube='/lscratch/kocevski/45347118/ltcube_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/45347118/Model_4FGL_J0719.3+3307_weekly_bin821.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0719.3+3307'

4FGL J0719.3+3307
   Spectrum: LogParabola
295         norm:  1.022e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-11)
296        alpha:  2.082e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
297         beta:  1.031e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.981e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/45347118/ft1_filtered_4FGL_J0719.3+3307_weekly_bin821.fits
Spacecraft file(s): /lscratch/kocevski/45347118/ft2_4FGL_J0719.3+3307_weekly_bin821.fits
Exposure map: /lscratch/kocevski/45347118/expmap_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits
Exposure cube: /lscratch/kocevski/45347118/ltcube_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/45347118/Model_4FGL_J0719.3+3307_weekly_bin821.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) = 20204.7694774

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .38858E-09   1.0000          .0000       .10000E+07
     2 'norm      '    5.0901       1.0000          .0000       .10000E+07
     3 'Prefactor '    .11102E-09   1.0000          .0000       .10000E+07
     4 'norm      '    .17761       1.0000          .0000       .10000E+07
     5 'Prefactor '    .68673E-01   1.0000          .0000       .10000E+07
     6 'Prefactor '    10.756       1.0000          .0000       .10000E+07
     7 'norm      '    8.0719       1.0000          .0000       .10000E+07
     8 'Prefactor '    45.508       1.0000          .0000       .10000E+07
     9 'Prefactor '    13.456       1.0000          .0000       .10000E+07
    10 'norm      '    5.1268       1.0000          .0000       .10000E+07
    11 'Normalizat'    1.0414       1.0000         .10000E-01   10.000    
    12 'Prefactor '    .95092       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6120E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   20204.75     FROM MIGRAD    STATUS=CONVERGED     52 CALLS      886 TOTAL
                     EDM=   .12E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .16653E-09    2.0081       -.26387E-06** at limit **
   2  norm          5.0894        3.7783       -.33066E-07   -.55110E-01
   3  Prefactor      .0000        .88188        .20872E-07** at limit **
   4  norm          .17751        .19271       -.47715E-09** at limit **
   5  Prefactor     .79642E-01    1.0435        .62984E-07** at limit **
   6  Prefactor     10.759        6.4374       -.81605E-07    .36902E-01
   7  norm          8.0724        2.7346       -.11520E-08    .77001E-03
   8  Prefactor     45.508        1.1315       -.40892E-08    .43893E-01
   9  Prefactor     13.457        2.2092       -.24581E-07    .39040E-01
  10  norm          5.1284        3.3972        .71877E-09    .73189E-01
  11  Normalizat    1.0411        .12128        .31195E-05    .47313E-03
  12  Prefactor     .95100        .62643E-01   -.23657E-06    .64903E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 1.66533e-10
  norm       = 5.08945
  Prefactor  = 0
  norm       = 0.177509
  Prefactor  = 0.0796419
  Prefactor  = 10.7592
  norm       = 8.07238
  Prefactor  = 45.5083
  Prefactor  = 13.4574
  norm       = 5.1284
  Normalizat = 1.04113
  Prefactor  = 0.951002
 **********
 **   18 **HESSE 
 **********

 FCN=   20204.75     FROM HESSE     STATUS=OK           165 CALLS     1051 TOTAL
                     EDM=   .85E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .16653E-09    2.0013        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          5.0894        4.2906        .44542E-03   -1.5663    
   3  Prefactor      .0000        .88154        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          .17751        .25160        .17954E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .79642E-01    .91029        .96756E-02   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     10.759        7.7122        .30525E-03   -1.5642    
   7  norm          8.0724        3.1011        .35266E-03   -1.5651    
   8  Prefactor     45.508        27.690        .14825E-03   -1.5573    
   9  Prefactor     13.457        9.4654        .27280E-03   -1.5635    
  10  norm          5.1284        4.6791        .44379E-03   -1.5663    
  11  Normalizat    1.0411        .11164        .69956E-01   -.91665    
  12  Prefactor     .95100        .55522E-01    .45651E-01   -.94381    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.4993e-08
Minuit parameter uncertainties:
  1  3.87097e-05
  2  4.2906
  3  3.13642e-06
  4  0.251603
  5  0.538507
  6  7.71223
  7  3.1011
  8  27.69
  9  9.46543
  10  4.67913
  11  0.111662
  12  0.0555249
Done.

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

Extracting fit parameters...

4FGL J0719.3+3307
   Spectrum: LogParabola
295         norm:  1.775e-01  2.516e-01  0.000e+00  1.000e+06 ( 1.000e-11)
296        alpha:  2.082e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
297         beta:  1.031e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.981e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
601    Prefactor:  9.510e-01  5.552e-02  0.000e+00  1.000e+01 ( 1.000e+00)
602        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
603        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
600   Normalization:  1.041e+00  1.117e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.99
Ra Dec: 109.840 33.123
Photon Index (Fixed Index): 2.08 +/- 0.00
Photon Flux (Fixed Index): 7.81e-09 +/- 1.11e-08
Energy Flux (Fixed Index): 3.65e-06 +/- 5.17e-06

TS (Fixed Index): 1.99
Ra Dec: 109.840 33.123
Photon Flux Upper Limit: 3.17128906157e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.4802508441e-05 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/45347118/likelihoodResults_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.txt

Performing a free index iterative likelihood fit...

Freezing all point sources, except source of interest...

Done.

Freeing candidate source...
Done.

Fit tolerance = 1

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 20203.7386304
delta logL = 1.01358435268

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 20203.7114491
delta logL = 1.0407655942

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .89363E-01   1.0000          .0000       .10000E+07
     2 'alpha     '    .96661       1.0000          .0000       5.0000    
     3 'Normalizat'    1.0461       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .95004       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6120E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   20203.71     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      222 TOTAL
                     EDM=   .21E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .89081E-01    .15472        .90129E-03** at limit **
   2  alpha         .96580        .51250        .50000       -.15168E-03
   3  Normalizat    1.0462        .10460        .69797E-01    .11045E-03
   4  Prefactor     .95000        .55202E-01    .45640E-01   -.26335E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0890806
  alpha      = 0.965796
  Normalizat = 1.04623
  Prefactor  = 0.950003
 **********
 **   18 **HESSE 
 **********

 FCN=   20203.71     FROM HESSE     STATUS=OK            33 CALLS      255 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .89081E-01    .13355        .55970E-04   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  alpha         .96580        .66187        .28376E-01   -.66072    
   3  Normalizat    1.0462        .11791        .30881E-03   -.91497    
   4  Prefactor     .95000        .62311E-01    .16929E-03   -.94415    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.04855e-10
Minuit parameter uncertainties:
  1  0.133552
  2  0.67495
  3  0.117936
  4  0.0623157
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 20203.7114459
delta logL = 1.04076880981

Extracting fit parameters...

4FGL J0719.3+3307
   Spectrum: LogParabola
295         norm:  8.908e-02  1.336e-01  0.000e+00  1.000e+06 ( 1.000e-11)
296        alpha:  9.658e-01  6.750e-01  0.000e+00  5.000e+00 ( 1.000e+00)
297         beta:  1.031e-01  0.000e+00 -5.000e+00  1.000e+01 ( 1.000e+00) fixed
298           Eb:  6.981e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
601    Prefactor:  9.500e-01  6.232e-02  0.000e+00  1.000e+01 ( 1.000e+00)
602        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
603        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
600   Normalization:  1.046e+00  1.179e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.07
Ra Dec: 109.840 33.123
Photon Index (Free Index): 0.97 +/- 0.67
Photon Flux (Free Index): 2.81e-09 +/- 3.26e-09
Energy Flux (Free Index): 1.57e-05 +/- 2.22e-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/45347118/cmap_HighResolution_735523201_736128001_4FGL_J0719.3+3307_weekly_bin821.png

Cleaning up...

** Nuclear option initiated! **

Updating database...
UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.48e-05', comment='SUCCESS', photon_flux='7.81e-09', energy_flux2='1.57e-05', photon_flux_error='1.11e-08', dlogl='1.04e+00', energy_flux='3.65e-06', photon_flux2='2.81e-09', job_status='DONE', time_completed='2024-04-30 02:15:40.567257', photon_index_error2='0.67', photon_index2='0.97', ts='1.99', fit_tolerance='1e-08', GAL='0.95', photon_index_error='0.00', photon_flux_upper_limit='3.17e-08', energy_flux_error2='2.22e-05', EG='1.04', time_epoch_completed='1714468540.57', return_code='0', job_id='45347118', GAL2='0.95', EG2='1.05', return_code2='0', energy_flux_error='5.17e-06', photon_flux_error2='3.26e-09', ts2='4.07', photon_index='2.08' WHERE bin_id='821' AND source_name='4FGL J0719.3+3307' AND cadence='weekly';
2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)
Traceback (most recent call last):
  File "/sdf/data/fermi/g/LCRepository/Likelihood/Scripts/DatabaseTools.py", line 110, in executeCommand
    mydb = mysql.connector.connect(host=host, user=user, passwd=passwd, database=database, port=port)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/__init__.py", line 179, in connect
    return MySQLConnection(*args, **kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 95, in __init__
    self.connect(**kwargs)
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/abstracts.py", line 722, in connect
    self._open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/connection.py", line 208, in _open_connection
    self._socket.open_connection()
  File "/sdf/group/fermi/u/kocevski/software/conda/envs/fermitools_v1.0.5/lib/python2.7/site-packages/mysql/connector/network.py", line 501, in open_connection
    errno=2003, values=(self.get_address(), _strioerror(err)))
InterfaceError: 2003: Can't connect to MySQL server on 'mysql-node01:3307' (-2 Name or service not known)

Command execution failed.

Waiting 11.1811822048 seconds and trying again...


UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.48e-05', comment='SUCCESS', photon_flux='7.81e-09', energy_flux2='1.57e-05', photon_flux_error='1.11e-08', dlogl='1.04e+00', energy_flux='3.65e-06', photon_flux2='2.81e-09', job_status='DONE', time_completed='2024-04-30 02:15:40.567257', photon_index_error2='0.67', photon_index2='0.97', ts='1.99', fit_tolerance='1e-08', GAL='0.95', photon_index_error='0.00', photon_flux_uppshell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
er_limit='3.17e-08', energy_flux_error2='2.22e-05', EG='1.04', time_epoch_completed='1714468540.57', return_code='0', job_id='45347118', GAL2='0.95', EG2='1.05', return_code2='0', energy_flux_error='5.17e-06', photon_flux_error2='3.26e-09', ts2='4.07', photon_index='2.08' WHERE bin_id='821' AND source_name='4FGL J0719.3+3307' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Apr 30 02:15:55 PDT 2024

