/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 181 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 = 7371
number of fields = 30
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1321.1+2216_daily_bin1389
RA = 200.296, Dec = 22.2808
tmin = 599356801, tmax = 599616001
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='502686', job_status='RUN', time_executed='2021-09-07 13:38:34.782454', time_epoch_executed='1631047114.78' WHERE source_name='4FGL J1321.1+2216' and cadence='daily' and bin_id='1389'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/502686

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/502686/ft1_4FGL_J1321.1+2216_daily_bin1389.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/502686/ft1_4FGL_J1321.1+2216_daily_bin1389.fits outfile=/scratch/kocevski/502686/ft1_filteredMKT_4FGL_J1321.1+2216_daily_bin1389.fits ra=200.296 dec=22.2808 rad=12.0 tmin=599356801.0 tmax=599616001.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 2.69
user 2.50
sys 0.18

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.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/502686/ft1_filteredMKT_4FGL_J1321.1+2216_daily_bin1389.fits evtable="EVENTS" outfile="/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.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.55
user 0.35
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits" evtable="EVENTS" scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits sctable="SC_DATA" outfile=/scratch/kocevski/502686/ltcube_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.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/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits
.....................!
real 14.25
user 13.39
sys 0.31

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits evtable="EVENTS" scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits sctable="SC_DATA" expcube=/scratch/kocevski/502686/ltcube_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits outfile=/scratch/kocevski/502686/expmap_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.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/502686/ltcube_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits
.....................!
real 191.36
user 185.81
sys 5.05

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Added 175 point sources and 0 extended sources

Setting source of interest to:
4FGL J1321.1+2216 @ 200.296 22.2808

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits outfile=/scratch/kocevski/502686/cmap_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.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=200.296 yref=22.2808 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.55
user 0.38
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits outfile=/scratch/kocevski/502686/cmap_HighResolution_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.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=200.296 yref=22.2808 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.56
user 0.41
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits evtable="EVENTS" scfile=/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/502686/Model_4FGL_J1321.1+2216_daily_bin1389.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits.....................!
real 73.10
user 71.60
sys 1.25

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits', '/scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits', expMap='/scratch/kocevski/502686/expmap_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits', expCube='/scratch/kocevski/502686/ltcube_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/502686/Model_4FGL_J1321.1+2216_daily_bin1389.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1321.1+2216'

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  7.564e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  2.281e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/502686/ft1_filtered_4FGL_J1321.1+2216_daily_bin1389.fits
Spacecraft file(s): /scratch/kocevski/502686/ft2_4FGL_J1321.1+2216_daily_bin1389.fits
Exposure map: /scratch/kocevski/502686/expmap_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits
Exposure cube: /scratch/kocevski/502686/ltcube_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/502686/Model_4FGL_J1321.1+2216_daily_bin1389.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) = 9484.5094551

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
     3 'norm      '    .10045E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    2.8757       1.0000         .10000E-03   10000.    
     5 'norm      '    .81765       1.0000         .10000E-03   10000.    
     6 'norm      '    45.676       1.0000         .10000E-03   10000.    
     7 'norm      '    .10013E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    24.360       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    4.8997       1.0000         .10000E-03   10000.    
    11 'Prefactor '    21.624       1.0000         .10000E-03   10000.    
    12 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    14.139       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10003E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    5.2811       1.0000         .10000E-03   10000.    
    16 'Prefactor '    .21616E-01   1.0000         .10000E-03   10000.    
    17 'Prefactor '    17.070       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10918       1.0000         .10000E-03   10000.    
    19 'Normalizat'    .91369       1.0000         .10000E-01   10.000    
    20 'Prefactor '    1.3398       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   9484.485     FROM MIGRAD    STATUS=CONVERGED    415 CALLS     1807 TOTAL
                     EDM=   .14E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    15.229        .45676E-06** at limit **
   2  Prefactor     .10000E-03    2.4673        .24338E-07** at limit **
   3  norm          .10000E-03    3.4762        .43929E-07** at limit **
   4  Prefactor     2.8742        10.998        .22614E-04   -.19522E-03
   5  norm          .81837        1.8661       -.39946E-06   -.18252E-02
   6  norm          45.678        6.2617        .81752E-06    .29173E-04
   7  norm          .10000E-03    8.0875       -.25406E-06** at limit **
   8  norm          24.361        16.060        .26166E-05   -.60427E-05
   9  Prefactor     .10000E-03    4.3514       -.16638E-06** at limit **
  10  norm          4.9011        5.4027        .12770E-05   -.38401E-03
  11  Prefactor     21.619        23.501        .10539E-04   -.32502E-04
  12  norm          .10000E-03    2.1537       -.35133E-07** at limit **
  13  Prefactor     14.146        13.962        .78666E-05   -.20428E-04
  14  Prefactor     .10000E-03    6.3213       -.11737E-06** at limit **
  15  Prefactor     5.2685        52.799       -.15071E-05   -.17099E-04
  16  Prefactor     .34455E-02    1.3145       -.27402E-06    .89873E-03
  17  Prefactor     17.064        12.684        .22009E-05   -.39535E-04
  18  Prefactor     .19920        5.6286       -.26410E-06    .52413E-03
  19  Normalizat    .91351        .16155       -.48873E-05   -.39586E-04
  20  Prefactor     1.3398        .15849       -.68164E-06   -.22162E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 2.87422
  norm       = 0.818367
  norm       = 45.6779
  norm       = 0.0001
  norm       = 24.3607
  Prefactor  = 0.0001
  norm       = 4.90113
  Prefactor  = 21.6185
  norm       = 0.0001
  Prefactor  = 14.1455
  Prefactor  = 0.0001
  Prefactor  = 5.26851
  Prefactor  = 0.00344554
  Prefactor  = 17.0643
  Prefactor  = 0.199198
  Normalizat = 0.913509
  Prefactor  = 1.3398
 **********
 **   18 **HESSE 
 **********

 FCN=   9484.485     FROM HESSE     STATUS=OK           313 CALLS     2120 TOTAL
                     EDM=   .61E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    15.234        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10000E-03    2.5196        .14937E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          .10000E-03    3.6403        .35441E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     2.8742        10.818        .23969E-03   -1.5369    
   5  norm          .81837        1.5966        .19438E-02   -1.5527    
   6  norm          45.678        6.2525        .59325E-04   -1.4355    
   7  norm          .10000E-03    8.1476        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          24.361        16.061        .81161E-04   -1.4720    
   9  Prefactor     .10000E-03    4.3590        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          4.9011        5.3876        .18171E-03   -1.5265    
  11  Prefactor     21.619        23.524        .86136E-04   -1.4778    
  12  norm          .10000E-03    2.1581        .13950E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     14.146        13.961        .10652E-03   -1.4956    
  14  Prefactor     .10000E-03    6.3362        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     5.2685        52.922        .17490E-03   -1.5249    
  16  Prefactor     .34455E-02    2.7851        .37646E-01   -1.5696    
  17  Prefactor     17.064        12.685        .96939E-04   -1.4882    
  18  Prefactor     .19920        10.034        .65780E-01   -1.5619    
  19  Normalizat    .91351        .19131        .28418E-03   -.95987    
  20  Prefactor     1.3398        .18977        .24505E-03   -.82131    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 6.1304e-09
Minuit parameter uncertainties:
  1  5.61452e-06
  2  1.04597e-05
  3  9.10494e-07
  4  10.8257
  5  1.59672
  6  6.25258
  7  0.000118377
  8  16.0637
  9  1.0669e-05
  10  5.38814
  11  23.5343
  12  5.69418e-07
  13  13.9643
  14  2.3315e-05
  15  33.4339
  16  0.193067
  17  12.6868
  18  2.8273
  19  0.19145
  20  0.189869
Done.

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

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  4.901e+00  5.388e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  2.281e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
558    Prefactor:  1.340e+00  1.899e-01  0.000e+00  1.000e+01 ( 1.000e+00)
559        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
560        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  9.135e-01  1.915e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.24
Ra Dec: 200.296 22.281
Photon Index (Fixed Index): 2.28 +/- 0.00
Photon Flux (Fixed Index): 2.43e-08 +/- 2.67e-08
Energy Flux (Fixed Index): 8.74e-06 +/- 9.61e-06

TS (Fixed Index): 1.24
Ra Dec: 200.296 22.281
Photon Flux Upper Limit: 8.26e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.97e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/502686/likelihoodResults_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.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) = 9483.94728353
delta logL = 0.538199191853

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 9483.94660598
delta logL = 0.53887673313

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.3892       1.0000         .10000E-03   10000.    
     2 'alpha     '    3.2468       1.0000          .0000       5.0000    
     3 'Normalizat'    .86622       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.3701       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   9483.947     FROM MIGRAD    STATUS=CONVERGED     83 CALLS      284 TOTAL
                     EDM=   .14E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.3894        6.2357        .12559E-03    .29183E-03
   2  alpha         3.2468        1.2394        .16784E-01    .36925E-04
   3  Normalizat    .86622        .18870        .29123E-03    .64958E-04
   4  Prefactor     1.3701        .18922        .24274E-03    .38555E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 3.38936
  alpha      = 3.24679
  Normalizat = 0.866223
  Prefactor  = 1.37009
 **********
 **   18 **HESSE 
 **********

 FCN=   9483.947     FROM HESSE     STATUS=OK            25 CALLS      309 TOTAL
                     EDM=   .30E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.3894        4.7132        .50238E-05   -1.5340    
   2  alpha         3.2468        .95587        .67136E-03    .30335    
   3  Normalizat    .86622        .18868        .11649E-04   -.97657    
   4  Prefactor     1.3701        .18895        .48547E-04   -.81246    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.97213e-11
Minuit parameter uncertainties:
  1  4.71376
  2  0.983484
  3  0.188826
  4  0.189044
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/502686': 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) = 9483.94660598
delta logL = 0.538876733455

Extracting fit parameters...

4FGL J1321.1+2216
   Spectrum: LogParabola
324         norm:  3.389e+00  4.714e+00  1.000e-04  1.000e+04 ( 1.000e-12)
325        alpha:  3.247e+00  9.835e-01  0.000e+00  5.000e+00 ( 1.000e+00)
326         beta:  7.755e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
327           Eb:  6.546e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
558    Prefactor:  1.370e+00  1.890e-01  0.000e+00  1.000e+01 ( 1.000e+00)
559        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
560        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
557   Normalization:  8.662e-01  1.888e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 2.43
Ra Dec: 200.296 22.281
Photon Index (Free Index): 3.25 +/- 0.98
Photon Flux (Free Index): 5.67e-08 +/- 4.43e-08
Energy Flux (Free Index): 1.06e-05 +/- 8.13e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/502686/cmap_HighResolution_599356801_599616001_4FGL_J1321.1+2216_daily_bin1389.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.97e-05', comment='SUCCESS', photon_flux='2.43e-08', energy_flux2='1.06e-05', photon_flux_error='2.67e-08', dlogl='5.39e-01', energy_flux='8.74e-06', photon_flux2='5.67e-08', job_status='DONE', time_completed='2021-09-07 13:50:49.235208', photon_index_error2='0.98', photon_index2='3.25', ts='1.24', fit_tolerance='1e-08', GAL='1.34', photon_index_error='0.00', photon_flux_upper_limit='8.26e-08', energy_flux_error2='8.13e-06', EG='0.91', time_epoch_completed='1631047849.24', return_code='0', job_id='502686', GAL2='1.37', EG2='0.87', return_code2='0', energy_flux_error='9.61e-06', photon_flux_error2='4.43e-08', ts2='2.43', photon_index='2.28' WHERE bin_id='1389' AND source_name='4FGL J1321.1+2216' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Tue Sep  7 13:50:49 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0038>
Subject: Job 502686: <4FGL_J1321.1+2216_daily_bin1389> in cluster <slac> Done

Job <4FGL_J1321.1+2216_daily_bin1389> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Tue Sep  7 13:35:23 2021
Job was executed on host(s) <bullet0038>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Sep  7 13:35:24 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Sep  7 13:35:24 2021
Terminated at Tue Sep  7 13:50:50 2021
Results reported at Tue Sep  7 13:50:50 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1321.1+2216_daily_bin1389 200.296 22.2808 599356801 599616001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1321.1+2216 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   732.00 sec.
    Max Memory :                                 1256 MB
    Average Memory :                             291.72 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   925 sec.
    Turnaround time :                            927 sec.

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

