/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/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)


Waiting 7 seconds before starting...
Proceeding.

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 make4FGLxml version 01r04.
The default diffuse model files and names are for pass 8 and 4FGL and assume you have v11r5p3 of the Fermi Science Tools or higher.

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

/nfs/farm/g/glast/g/LCRepository/bin/miniconda2/envs/fermitools_v1.0.5/lib/python2.7/site-packages/matplotlib/cbook/deprecation.py:106: MatplotlibDeprecationWarning: The mpl_toolkits.axes_grid module was deprecated in version 2.1. Use mpl_toolkits.axes_grid1 and mpl_toolkits.axisartist provies the same functionality instead.
  warnings.warn(message, mplDeprecation, stacklevel=1)

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

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


Performing analysis on: 4FGL_J2032.0+1219_monthly_bin147
RA = 308.004, Dec = 12.3279
tmin = 618019201, tmax = 620611201
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='861508', job_status='RUN', time_executed='2021-11-06 06:41:05.993618', time_epoch_executed='1636206065.99' WHERE source_name='4FGL J2032.0+1219' and cadence='monthly' and bin_id='147'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/861508

Creating custom pfile directory:
/scratch/kocevski/861508/pfiles/

Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStop>=618019201.0 && nMetStart<620611201.0' /Data/Flight/Reprocess/P305

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=618019201.0 && nMetStart<620611201.0' /Data/Flight/Level1/LPA

Retrieving 458 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/861508/ft1_4FGL_J2032.0+1219_monthly_bin147.fits


Retrieving the FT1 file...

Issuing command:
/afs/slac.stanford.edu/g/glast/ground/bin/datacat find --group FT2 --filter 'nMetStop>=618019201.0 && nMetStart<620611201.0' /Data/Flight/Level1/LPA

Retrieving 458 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/861508/ft1_4FGL_J2032.0+1219_monthly_bin147.fits outfile=/scratch/kocevski/861508/ft1_filteredMKT_4FGL_J2032.0+1219_monthly_bin147.fits ra=308.004 dec=12.3279 rad=12.0 tmin=618019201.0 tmax=620611201.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 33.86
user 32.99
sys 0.73

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/scratch/kocevski/861508/ft1_filteredMKT_4FGL_J2032.0+1219_monthly_bin147.fits evtable="EVENTS" outfile="/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.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('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/nfs/farm/g/glast/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.87
user 0.65
sys 0.18

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits" evtable="EVENTS" scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits sctable="SC_DATA" outfile=/scratch/kocevski/861508/ltcube_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.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 /scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits
.....................!
real 114.54
user 113.93
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits evtable="EVENTS" scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits sctable="SC_DATA" expcube=/scratch/kocevski/861508/ltcube_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits outfile=/scratch/kocevski/861508/expmap_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.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 /scratch/kocevski/861508/ltcube_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits
.....................!
real 192.70
user 187.34
sys 4.83

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 W 51C in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/W51C.fits is the correct path to the extended template.
Extended source G42.8+0.6 in ROI with RadialDisk spatial model.
Extended source Cygnus Loop in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 233 point sources and 3 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 J2032.0+1219 @ 308.004 12.3279

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits outfile=/scratch/kocevski/861508/cmap_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.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=308.004 yref=12.3279 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.78
user 0.62
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits outfile=/scratch/kocevski/861508/cmap_HighResolution_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.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=308.004 yref=12.3279 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.79
user 0.63
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits evtable="EVENTS" scfile=/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/861508/Model_4FGL_J2032.0+1219_monthly_bin147.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 G42.8+0.6
adding source GAL_V02
adding source W 51C
Working on...
/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits.....................!
real 2656.82
user 2649.72
sys 1.61

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits', '/scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits', expMap='/scratch/kocevski/861508/expmap_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits', expCube='/scratch/kocevski/861508/ltcube_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/861508/Model_4FGL_J2032.0+1219_monthly_bin147.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2032.0+1219'

4FGL J2032.0+1219
   Spectrum: PowerLaw
524    Prefactor:  2.905e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
525        Index:  2.414e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
526        Scale:  1.425e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/861508/ft1_filtered_4FGL_J2032.0+1219_monthly_bin147.fits
Spacecraft file(s): /scratch/kocevski/861508/ft2_4FGL_J2032.0+1219_monthly_bin147.fits
Exposure map: /scratch/kocevski/861508/expmap_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits
Exposure cube: /scratch/kocevski/861508/ltcube_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/861508/Model_4FGL_J2032.0+1219_monthly_bin147.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) = 112052.939612

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10169E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    4.5643       1.0000         .10000E-03   10000.    
     3 'norm      '    .43756       1.0000         .10000E-03   10000.    
     4 'Prefactor '    3.0576       1.0000         .10000E-03   10000.    
     5 'norm      '    .30284       1.0000         .10000E-03   10000.    
     6 'Prefactor '    1.4053       1.0000         .10000E-03   10000.    
     7 'Prefactor '    11.331       1.0000         .10000E-03   10000.    
     8 'norm      '    .28996       1.0000         .10000E-03   10000.    
     9 'Prefactor '    6.4827       1.0000         .10000E-03   10000.    
    10 'norm      '    7.7074       1.0000         .10000E-03   10000.    
    11 'norm      '    .10157E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    4.7302       1.0000         .10000E-03   10000.    
    13 'Prefactor '    8.9136       1.0000         .10000E-03   10000.    
    14 'Prefactor '    2.8291       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10065E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10005E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    18 'Normalizat'    1.0939       1.0000         .10000E-01   10.000    
    19 'Prefactor '    .97446       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8340E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   112051.9     FROM MIGRAD    STATUS=CONVERGED    385 CALLS     1674 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    8.4481         .0000    ** at limit **
   2  Prefactor     4.5567        7.5353         .0000       -.69724E-03
   3  norm          .43762        .88311         .0000        .31143E-01
   4  Prefactor     3.0561        3.3487         .0000        .36598E-01
   5  norm          .30286        .58835         .0000        .15823E-01
   6  Prefactor     1.4061        1.9618         .0000        .31032E-02
   7  Prefactor     11.325        5.2454         .0000       -.20755E-02
   8  norm          .29006        .19819         .0000        .20514E-01
   9  Prefactor     6.4774        13.112         .0000        .13816E-02
  10  norm          7.7086        2.7730         .0000        .20736E-01
  11  norm          .10000E-03    22.619         .0000    ** at limit **
  12  Prefactor     4.7280        4.6020         .0000        .89591E-03
  13  Prefactor     8.9398        5.6458         .0000       -.46479E-03
  14  Prefactor     2.8254        4.4546         .0000        .17026E-02
  15  Prefactor     .10000E-03    3.8767         .0000    ** at limit **
  16  Prefactor     .10000E-03    2.5291         .0000    ** at limit **
  17  Prefactor     .10000E-03    1.8975         .0000    ** at limit **
  18  Normalizat    1.0939        .88430E-01     .0000        .41151E-03
  19  Prefactor     .97446        .21153E-01     .0000       -.76017E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 4.55667
  norm       = 0.43762
  Prefactor  = 3.05606
  norm       = 0.302861
  Prefactor  = 1.40615
  Prefactor  = 11.3253
  norm       = 0.290057
  Prefactor  = 6.47736
  norm       = 7.70863
  norm       = 0.0001
  Prefactor  = 4.72801
  Prefactor  = 8.93982
  Prefactor  = 2.82539
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.09386
  Prefactor  = 0.97446
 **********
 **   18 **HESSE 
 **********

 FCN=   112051.9     FROM HESSE     STATUS=OK           278 CALLS     1952 TOTAL
                     EDM=   .65E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    8.5484        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     4.5567        7.5404        .18842E-03   -1.5281    
   3  norm          .43762        .87812        .43003E-03   -1.5576    
   4  Prefactor     3.0561        3.3434        .11600E-02   -1.5358    
   5  norm          .30286        .69260        .34887E-02   -1.5598    
   6  Prefactor     1.4061        1.9060        .36575E-03   -1.5471    
   7  Prefactor     11.325        4.9879        .11901E-03   -1.5035    
   8  norm          .29006        .18300        .10409E-03   -1.5600    
   9  Prefactor     6.4774        12.995        .15763E-03   -1.5199    
  10  norm          7.7086        2.7643        .72221E-03   -1.5153    
  11  norm          .10000E-03    22.895        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     4.7280        4.5907        .18501E-03   -1.5273    
  13  Prefactor     8.9398        5.6473        .13425E-03   -1.5110    
  14  Prefactor     2.8254        4.4590        .24179E-03   -1.5372    
  15  Prefactor     .10000E-03    3.9526        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    2.5510        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    1.9020        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Normalizat    1.0939        .96993E-01    .51649E-03   -.89949    
  19  Prefactor     .97446        .23346E-01    .13773E-03   -.93586    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.46376e-07
Minuit parameter uncertainties:
  1  3.77539e-06
  2  7.54196
  3  0.878147
  4  3.34365
  5  0.692623
  6  1.90609
  7  4.98805
  8  0.183002
  9  13.0002
  10  2.76434
  11  3.25571e-05
  12  4.59106
  13  5.64761
  14  4.45949
  15  2.39525e-05
  16  7.83521e-06
  17  9.0634e-06
  18  0.0970084
  19  0.0233467
Done.

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

Extracting fit parameters...

4FGL J2032.0+1219
   Spectrum: PowerLaw
524    Prefactor:  1.406e+00  1.906e+00  1.000e-04  1.000e+04 ( 1.000e-13)
525        Index:  2.414e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
526        Scale:  1.425e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
827    Prefactor:  9.745e-01  2.335e-02  0.000e+00  1.000e+01 ( 1.000e+00)
828        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
829        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
823   Normalization:  1.094e+00  9.701e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.11
Ra Dec: 308.004 12.328
Photon Index (Fixed Index): 2.41 +/- 0.00
Photon Flux (Fixed Index): 6.08e-09 +/- 8.23e-09
Energy Flux (Fixed Index): 1.95e-06 +/- 2.65e-06

TS (Fixed Index): 1.11
Ra Dec: 308.004 12.328
Photon Flux Upper Limit: 2.76e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.14e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/861508/likelihoodResults_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.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) = 112051.70891
delta logL = 0.236819515136

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 112051.708525
delta logL = 0.237204043238

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    1.3520       1.0000         .10000E-03   10000.    
     2 'Index     '    1.7407       1.0000          .0000       10.000    
     3 'Normalizat'    1.0981       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .97404       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .8340E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 MIGRAD MINIMIZATION HAS CONVERGED.

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

 FCN=   112051.7     FROM MIGRAD    STATUS=FAILED       108 CALLS      270 TOTAL
                     EDM=   .40E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3521        1.8703        .18809E-02   -.33978E-03
   2  Index         1.7396        .88561        .28620E-01   -.83865E-03
   3  Normalizat    1.0981        .88749E-01    .51562E-03   -.21167E-04
   4  Prefactor     .97404        .22663E-01    .13776E-03   -.96388E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   112051.7     FROM SIMPLEX   STATUS=UNCHANGED     69 CALLS      339 TOTAL
                     EDM=   .13E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3521        1.8703        .65220E-04   -1.5475    
   2  Index         1.7396        .88561        .89589E-03   -.71034    
   3  Normalizat    1.0981        .88749E-01    .98843E-04   -.89812    
   4  Prefactor     .97404        .22663E-01    .36569E-04   -.93600    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   112051.7     FROM MIGRAD    STATUS=CONVERGED     29 CALLS      368 TOTAL
                     EDM=   .63E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     1.3521        1.9216        .37618E-03    .24177E-04
   2  Index         1.7396        .91167        .57240E-02   -.33450E-04
   3  Normalizat    1.0981        .88778E-01    .20625E-04   -.21167E-04
   4  Prefactor     .97404        .22671E-01    .55105E-05   -.92427E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 1.35206
  Index      = 1.73956
  Normalizat = 1.09812
  Prefactor  = 0.974037
 **********
 **   18 **HESSE 
 **********

 FCN=   112051.7     FROM HESSE     STATUS=OK            25 CALLS      393 TOTAL
                     EDM=   .32E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     1.3521        1.9315        .15047E-04   -1.5475    
   2  Index         1.7396        .91633        .11448E-02   -.71034    
   3  Normalizat    1.0981        .88689E-01    .41250E-05   -.89812    
   4  Prefactor     .97404        .22649E-01    .11021E-05   -.93600    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.21779e-13
Minuit parameter uncertainties:
  1  1.93157
  2  0.925496
  3  0.0887008
  4  0.0226492
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/861508': No such file or directory
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 112051.708524
delta logL = 0.237205126381

Extracting fit parameters...

4FGL J2032.0+1219
   Spectrum: PowerLaw
524    Prefactor:  1.352e+00  1.932e+00  1.000e-04  1.000e+04 ( 1.000e-13)
525        Index:  1.740e+00  9.255e-01  0.000e+00  1.000e+01 (-1.000e+00)
526        Scale:  1.425e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
827    Prefactor:  9.740e-01  2.265e-02  0.000e+00  1.000e+01 ( 1.000e+00)
828        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
829        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
823   Normalization:  1.098e+00  8.870e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.58
Ra Dec: 308.004 12.328
Photon Index (Free Index): 1.74 +/- 0.93
Photon Flux (Free Index): 1.85e-09 +/- 4.27e-09
Energy Flux (Free Index): 2.66e-06 +/- 4.16e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -2.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  2.220e+00 [aplpy.core]
Saving /scratch/kocevski/861508/cmap_HighResolution_618019201_620611201_4FGL_J2032.0+1219_monthly_bin147.png

Cleaning up...

** Nuclear option initiated! **
rmdir /scratch/kocevski/861508

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.14e-03', comment='SUCCESS', photon_flux='6.08e-09', energy_flux2='2.66e-06', photon_flux_error='8.23e-09', dlogl='2.37e-01', energy_flux='1.95e-06', photon_flux2='1.85e-09', job_status='DONE', time_completed='2021-11-06 09:17:38.789985', photon_index_error2='0.93', photon_index2='1.74', ts='1.11', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', photon_flux_upper_limit='2.76e-08', energy_flux_error2='4.16e-06', EG='1.09', time_epoch_completed='1636215458.79', return_code='0', job_id='861508', GAL2='0.97', EG2='1.10', return_code2='0', energy_flux_error='2.65e-06', photon_flux_error2='4.27e-09', ts2='1.58', photon_index='2.41' WHERE bin_id='147' AND source_name='4FGL J2032.0+1219' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Sat Nov  6 09:17:38 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0216>
Subject: Job 861508: <4FGL_J2032.0+1219_monthly_bin147> in cluster <slac> Done

Job <4FGL_J2032.0+1219_monthly_bin147> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sat Nov  6 06:20:17 2021
Job was executed on host(s) <bullet0216>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Nov  6 06:40:51 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Nov  6 06:40:51 2021
Terminated at Sat Nov  6 09:17:39 2021
Results reported at Sat Nov  6 09:17:39 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2032.0+1219_monthly_bin147 308.004 12.3279 618019201 620611201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2032.0+1219 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   9292.00 sec.
    Max Memory :                                 1268 MB
    Average Memory :                             529.69 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   9408 sec.
    Turnaround time :                            10642 sec.

The output (if any) is above this job summary.

