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


Performing analysis on: 4FGL_J0521.2+1637_daily_bin1195
RA = 80.3136, Dec = 16.631
tmin = 549072001, tmax = 549331201
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='213785', job_status='RUN', time_executed='2021-08-22 10:46:05.914126', time_epoch_executed='1629654365.91' WHERE source_name='4FGL J0521.2+1637' and cadence='daily' and bin_id='1195'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/213785

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/213785/ft1_4FGL_J0521.2+1637_daily_bin1195.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/213785/ft1_4FGL_J0521.2+1637_daily_bin1195.fits outfile=/scratch/kocevski/213785/ft1_filteredMKT_4FGL_J0521.2+1637_daily_bin1195.fits ra=80.3136 dec=16.631 rad=12.0 tmin=549072001.0 tmax=549331201.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 3.19
user 2.70
sys 0.42

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.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/213785/ft1_filteredMKT_4FGL_J0521.2+1637_daily_bin1195.fits evtable="EVENTS" outfile="/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.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.74
user 0.34
sys 0.37

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits" evtable="EVENTS" scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits sctable="SC_DATA" outfile=/scratch/kocevski/213785/ltcube_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.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/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits
.....................!
real 12.92
user 12.31
sys 0.53

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits evtable="EVENTS" scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits sctable="SC_DATA" expcube=/scratch/kocevski/213785/ltcube_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits outfile=/scratch/kocevski/213785/expmap_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.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/213785/ltcube_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits
.....................!
real 191.08
user 185.55
sys 4.63

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 S 147 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Extended source Rosette in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Added 169 point sources and 4 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 J0521.2+1637 @ 80.3136 16.631

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits outfile=/scratch/kocevski/213785/cmap_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.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=80.3136 yref=16.631 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.77
user 0.36
sys 0.39

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits outfile=/scratch/kocevski/213785/cmap_HighResolution_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.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=80.3136 yref=16.631 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.77
user 0.39
sys 0.37

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits evtable="EVENTS" scfile=/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/213785/Model_4FGL_J0521.2+1637_daily_bin1195.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 Monoceros
adding source Rosette
adding source S 147
Working on...
/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits....................!
real 74.53
user 72.59
sys 1.49

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits', '/scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits', expMap='/scratch/kocevski/213785/expmap_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits', expCube='/scratch/kocevski/213785/ltcube_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/213785/Model_4FGL_J0521.2+1637_daily_bin1195.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0521.2+1637'

4FGL J0521.2+1637
   Spectrum: PowerLaw
242    Prefactor:  4.819e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
243        Index:  2.231e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
244        Scale:  2.276e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/213785/ft1_filtered_4FGL_J0521.2+1637_daily_bin1195.fits
Spacecraft file(s): /scratch/kocevski/213785/ft2_4FGL_J0521.2+1637_daily_bin1195.fits
Exposure map: /scratch/kocevski/213785/expmap_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits
Exposure cube: /scratch/kocevski/213785/ltcube_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/213785/Model_4FGL_J0521.2+1637_daily_bin1195.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) = 2484.46123193

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '   10000.0       1.0000         .10000E-03   10000.    
     2 'norm      '   10000.0       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .11310E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10872E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .15557E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    .10815E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
     8 'norm      '    .12896E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .13619E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    300.70       1.0000         .10000E-03   10000.    
    11 'Prefactor '    .12522E-03   1.0000         .10000E-03   10000.    
    12 'norm      '    .10147E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .11631E-03   1.0000         .10000E-03   10000.    
    14 'norm      '    .10790E-03   1.0000         .10000E-03   10000.    
    15 'norm      '    .10053E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    1.1762       1.0000         .10000E-03   10000.    
    17 'norm      '    12.039       1.0000         .10000E-03   10000.    
    18 'Prefactor '    5.6005       1.0000         .10000E-03   10000.    
    19 'Prefactor '    63.079       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .23088E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10072E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    6.2957       1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
    24 'Normalizat'    .10006E-01   1.0000         .10000E-01   10.000    
    25 'Prefactor '    .96721       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5910E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   2472.755     FROM MIGRAD    STATUS=CONVERGED    578 CALLS     3355 TOTAL
                     EDM=   .41E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.7%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm         10000.0        661.99       -.39878E-05** at limit **
   2  norm         10000.0        1971.3       -.31457E-04** at limit **
   3  Prefactor     .10000E-03    180.93       -.32885E-05** at limit **
   4  Prefactor     .10000E-03    133.86        .34786E-05** at limit **
   5  Prefactor     .10001E-03    1364.9        .32933E-04** at limit **
   6  norm          .10000E-03    11.594        .46971E-07** at limit **
   7  Prefactor     .10000E-03    28.906        .26946E-06** at limit **
   8  norm          .10000E-03    338.19       -.75681E-07** at limit **
   9  Prefactor     .10000E-03    41.375        .73677E-06** at limit **
  10  Prefactor     300.28        515.40        .34519E-05   -.75828E-05
  11  Prefactor     .10000E-03    384.27        .23732E-05** at limit **
  12  norm          .10000E-03    14.589        .66227E-07** at limit **
  13  Prefactor     .10000E-03    242.25       -.38479E-05** at limit **
  14  norm          .10000E-03    15.116       -.33230E-06** at limit **
  15  norm          .10000E-03    22.239        .92349E-05** at limit **
  16  Prefactor     1.1757        .51563       -.51075E-07   -.23459E-02
  17  norm          12.041        11.531        .12204E-06   -.99519E-04
  18  Prefactor     5.5967        4.3762       -.45882E-06   -.83471E-03
  19  Prefactor     63.359        104.44        .99842E-05    .16027E-05
  20  Prefactor     .10000E-03    165.31       -.89933E-05** at limit **
  21  Prefactor     .10000E-03    38.664       -.94822E-06** at limit **
  22  Prefactor     6.3289        22.557       -.43592E-05   -.12096E-03
  23  Prefactor     .10000E-03    7.0567        .24192E-06** at limit **
  24  Normalizat    .10000E-01    .42534        .24898E-04** at limit **
  25  Prefactor     .96738        .87121E-01   -.18406E-06   -.90123E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 10000
  norm       = 10000
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.000100006
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 300.284
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.000100001
  Prefactor  = 1.17568
  norm       = 12.0408
  Prefactor  = 5.59673
  Prefactor  = 63.3587
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 6.32891
  Prefactor  = 0.0001
  Normalizat = 0.01
  Prefactor  = 0.967381
 **********
 **   18 **HESSE 
 **********

 FCN=   2472.755     FROM HESSE     STATUS=OK           415 CALLS     3770 TOTAL
                     EDM=   .96E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm         10000.0        662.23        .20429E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm         10000.0        1976.0        .18808E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    181.00        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .10000E-03    133.93        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10001E-03    1371.1        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          .10000E-03    11.600        .16540E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    28.916        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  norm          .10000E-03    338.35        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    41.382        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     300.28        516.29        .11711E-03   -1.2225    
  11  Prefactor     .10000E-03    384.31        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm          .10000E-03    14.597        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    242.50        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  norm          .10000E-03    15.115        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  norm          .10000E-03    22.218        .19258E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     1.1757        .55325        .16265E-04   -1.5491    
  17  norm          12.041        11.963        .11545E-03   -1.5014    
  18  Prefactor     5.5967        4.6168        .69010E-04   -1.5235    
  19  Prefactor     63.359        104.99        .25262E-03   -1.4114    
  20  Prefactor     .10000E-03    165.70        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    38.660        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     6.3289        22.703        .15998E-03   -1.5205    
  23  Prefactor     .10000E-03    7.0660        .12902E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Normalizat    .10000E-01    .49597        .20061E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     .96738        .89859E-01    .13379E-03   -.93825    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.56326e-10
Minuit parameter uncertainties:
  1  0.000484482
  2  0.00616583
  3  0.000200093
  4  0.000163843
  5  0.00566819
  6  7.36674e-06
  7  4.25885e-06
  8  7.77378e-05
  9  2.58277e-05
  10  524.508
  11  0.000265271
  12  1.02543e-05
  13  4.62654e-05
  14  3.99306e-05
  15  0.000221085
  16  0.553252
  17  11.9651
  18  4.61708
  19  105.295
  20  0.000344492
  21  8.03131e-06
  22  22.7335
  23  9.29493e-06
  24  1.47808e-05
  25  0.0898728
Done.

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

Extracting fit parameters...

4FGL J0521.2+1637
   Spectrum: PowerLaw
242    Prefactor:  1.000e-04  2.653e-04  1.000e-04  1.000e+04 ( 1.000e-14)
243        Index:  2.231e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
244        Scale:  2.276e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
572    Prefactor:  9.674e-01  8.987e-02  0.000e+00  1.000e+01 ( 1.000e+00)
573        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
574        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
571   Normalization:  1.000e-02  1.478e-05  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 80.314 16.631
Photon Flux Upper Limit: 1.63e-06 ph cm-2 s-1
Energy Flux Upper Limit: 1.25e-01 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/213785/likelihoodResults_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.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) = 2472.75459429
delta logL = -1.93682294594e-05

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 2472.75457492
delta logL = 2.33194441535e-09

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   2472.755     FROM MIGRAD    STATUS=CONVERGED     58 CALLS      248 TOTAL
                     EDM=   .21E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    713.81        .90712E-02** at limit **
   2  Index         2.1905        5.8118        .50000        .37495E-06
   3  Normalizat    .10000E-01    .39306        .32094    ** at limit **
   4  Prefactor     .96738        .85140E-01    .30272E-01    .43633E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Index      = 2.19051
  Normalizat = 0.01
  Prefactor  = 0.967383
 **********
 **   18 **HESSE 
 **********

 FCN=   2472.755     FROM HESSE     STATUS=OK            33 CALLS      281 TOTAL
                     EDM=   .21E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    350.13        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.1905        6.0934        .50000       -.59668    
   3  Normalizat    .10000E-01    .41378        .20062E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     .96738        .81417E-01    .13379E-03   -.93825    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.05989e-12
Minuit parameter uncertainties:
  1  8.29948e-05
  2  4.18788
  3  3.50394e-07
  4  0.081427
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/213785': 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) = 2472.75457491
delta logL = 4.14956957684e-09

Extracting fit parameters...

4FGL J0521.2+1637
   Spectrum: PowerLaw
242    Prefactor:  1.000e-04  8.299e-05  1.000e-04  1.000e+04 ( 1.000e-14)
243        Index:  2.191e+00  4.188e+00  0.000e+00  1.000e+01 (-1.000e+00)
244        Scale:  2.276e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
572    Prefactor:  9.674e-01  8.143e-02  0.000e+00  1.000e+01 ( 1.000e+00)
573        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
574        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
571   Normalization:  1.000e-02  3.504e-07  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 80.314 16.631

Creating a high resolution counts map...
INFO: Auto-setting vmin to  0.000e+00 [aplpy.core]
INFO: Auto-setting vmax to  0.000e+00 [aplpy.core]
Saving /scratch/kocevski/213785/cmap_HighResolution_549072001_549331201_4FGL_J0521.2+1637_daily_bin1195.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.25e-01', job_status='DONE', photon_flux_upper_limit='1.63e-06', time_completed='2021-08-22 10:55:10.802761', job_id='213785', GAL2='0.97', fit_tolerance='1e-08', EG2='0.01', EG='0.01', time_epoch_completed='1629654910.8', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.97', dlogl='4.15e-09', ts2='-0.00', photon_index_error='0.00', photon_index='2.23' WHERE bin_id='1195' AND source_name='4FGL J0521.2+1637' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Aug 22 10:55:10 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0052>
Subject: Job 213785: <4FGL_J0521.2+1637_daily_bin1195> in cluster <slac> Done

Job <4FGL_J0521.2+1637_daily_bin1195> was submitted from host <rhel6-64d> by user <kocevski> in cluster <slac> at Sun Aug 22 10:45:25 2021
Job was executed on host(s) <bullet0052>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Aug 22 10:45:27 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Aug 22 10:45:27 2021
Terminated at Sun Aug 22 10:55:11 2021
Results reported at Sun Aug 22 10:55:11 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0521.2+1637_daily_bin1195 80.3136 16.631 549072001 549331201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0521.2+1637 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   537.24 sec.
    Max Memory :                                 1095 MB
    Average Memory :                             345.37 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   584 sec.
    Turnaround time :                            586 sec.

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

