/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 174 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 = 7393
number of fields = 22
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1221.3+3010_daily_bin75
RA = 185.345, Dec = 30.1677
tmin = 258768001, tmax = 259027201
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='513111', job_status='RUN', time_executed='2021-09-05 09:03:42.486707', time_epoch_executed='1630857822.49' WHERE source_name='4FGL J1221.3+3010' and cadence='daily' and bin_id='75'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/513111

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

Retrieving the FT1 file...

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

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

Retrieving 31 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/513111/ft1_4FGL_J1221.3+3010_daily_bin75.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/513111/ft1_4FGL_J1221.3+3010_daily_bin75.fits outfile=/scratch/kocevski/513111/ft1_filteredMKT_4FGL_J1221.3+3010_daily_bin75.fits ra=185.345 dec=30.1677 rad=12.0 tmin=258768001.0 tmax=259027201.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 1.11
user 0.93
sys 0.17

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.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/513111/ft1_filteredMKT_4FGL_J1221.3+3010_daily_bin75.fits evtable="EVENTS" outfile="/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.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.49
user 0.33
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits" evtable="EVENTS" scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits sctable="SC_DATA" outfile=/scratch/kocevski/513111/ltcube_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.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/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits
.....................!
real 8.98
user 8.61
sys 0.33

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits evtable="EVENTS" scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits sctable="SC_DATA" expcube=/scratch/kocevski/513111/ltcube_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits outfile=/scratch/kocevski/513111/expmap_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.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/513111/ltcube_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits
.....................!
real 194.18
user 188.24
sys 5.49

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

Setting source of interest to:
4FGL J1221.3+3010 @ 185.345 30.1677

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits outfile=/scratch/kocevski/513111/cmap_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.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=185.345 yref=30.1677 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.53
user 0.38
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits outfile=/scratch/kocevski/513111/cmap_HighResolution_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.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=185.345 yref=30.1677 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.54
user 0.37
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits evtable="EVENTS" scfile=/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/513111/Model_4FGL_J1221.3+3010_daily_bin75.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/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits.....................!
real 36.82
user 35.39
sys 1.16

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits', '/scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits', expMap='/scratch/kocevski/513111/expmap_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits', expCube='/scratch/kocevski/513111/ltcube_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/513111/Model_4FGL_J1221.3+3010_daily_bin75.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1221.3+3010'

4FGL J1221.3+3010
   Spectrum: PowerLaw
317    Prefactor:  1.833e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
318        Index:  1.707e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
319        Scale:  4.501e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/513111/ft1_filtered_4FGL_J1221.3+3010_daily_bin75.fits
Spacecraft file(s): /scratch/kocevski/513111/ft2_4FGL_J1221.3+3010_daily_bin75.fits
Exposure map: /scratch/kocevski/513111/expmap_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits
Exposure cube: /scratch/kocevski/513111/ltcube_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/513111/Model_4FGL_J1221.3+3010_daily_bin75.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) = 3496.97055652

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .14316E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    37.958       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10074E-03   1.0000         .10000E-03   10000.    
     4 'Prefactor '    11.625       1.0000         .10000E-03   10000.    
     5 'Prefactor '    .46979       1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10016E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    140.33       1.0000         .10000E-03   10000.    
     8 'norm      '    5.6328       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10011E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    6.0276       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    3.2325       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .23304       1.0000         .10000E-03   10000.    
    16 'norm      '    .47098       1.0000         .10000E-03   10000.    
    17 'norm      '    .11372E-03   1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    5.4975       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10125E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    4.5220       1.0000         .10000E-03   10000.    
    23 'norm      '    .10005E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10117E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    2.4461       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .52034       1.0000         .10000E-03   10000.    
    27 'norm      '    .10012E-03   1.0000         .10000E-03   10000.    
    28 'norm      '    .22843E-02   1.0000         .10000E-03   10000.    
    29 'norm      '    12.707       1.0000         .10000E-03   10000.    
    30 'Normalizat'    1.1566       1.0000         .10000E-01   10.000    
    31 'Prefactor '    .75685       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+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.
 MIGRAD TERMINATED WITHOUT CONVERGENCE.

 FCN=   3496.911     FROM MIGRAD    STATUS=FAILED      1457 CALLS     4827 TOTAL
                     EDM=   .47E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    41.935        .18142E-02** at limit **
   2  Prefactor     37.947        25.061        .65054E-04   -.21320E-04
   3  Prefactor     .10000E-03    5.1492        .12994E-02** at limit **
   4  Prefactor     11.624        26.791        .11749E-03    .51863E-04
   5  Prefactor     .46900        2.1928        .16062E-03   -.18190E-04
   6  Prefactor     .10000E-03    17.849        .18142E-02** at limit **
   7  Prefactor     140.32        107.85        .17003E-03    .73549E-06
   8  norm          5.6326        2.1804        .51104E-04    .66739E-04
   9  Prefactor     .10000E-03    3.8321        .11232E-02** at limit **
  10  Prefactor     .10000E-03    19.885        .18142E-02** at limit **
  11  norm          6.0274        4.1058        .94017E-04    .30230E-05
  12  Prefactor     .10000E-03    2.1550        .84773E-03** at limit **
  13  Prefactor     .10000E-03    1.2965        .65543E-03** at limit **
  14  Prefactor     3.2322        2.7699        .86265E-04   -.13904E-04
  15  Prefactor     .24068        30.586        .30743E-02    .14674E-02
  16  norm          .47088        .32876        .26986E-04   -.44656E-04
  17  norm          .10000E-03    11.194        .23983E-02** at limit **
  18  Prefactor     .10000E-03    4.5872        .12361E-02** at limit **
  19  Prefactor     5.4965        14.366        .17136E-03   -.16586E-06
  20  Prefactor     .10000E-03    69.782        .18142E-02** at limit **
  21  Prefactor     .10000E-03    3.6437        .11012E-02** at limit **
  22  Prefactor     4.5390        7.6925        .18015E-03   -.98446E-05
  23  norm          .10000E-03    2.1799        .84955E-03** at limit **
  24  Prefactor     .10000E-03    38.127        .18142E-02** at limit **
  25  norm          2.4450        5.6516        .20324E-03    .30206E-05
  26  Prefactor     .39614        229.81        .45232E-02    .44768E-03
  27  norm          .10000E-03    3.4361        .10685E-02** at limit **
  28  norm          .10004E-03    41.335        .19816E-02** at limit **
  29  norm          12.727        9.1404        .11237E-03    .55644E-06
  30  Normalizat    1.1568        .27468        .22384E-03    .30982E-04
  31  Prefactor     .75677        .29816        .31089E-03    .11409E-04
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   3496.911     FROM SIMPLEX   STATUS=UNCHANGED   1575 CALLS     6402 TOTAL
                     EDM=   .20E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    41.935        .88553E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     37.947        25.061        .14725E-05   -1.4475    
   3  Prefactor     .10000E-03    5.1492        .32782E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     11.624        26.791        .15293E-05   -1.5026    
   5  Prefactor     .46900        2.1928        .15840E-05   -1.5571    
   6  Prefactor     .10000E-03    17.849        .68276E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     140.32        107.85        .13569E-05   -1.3333    
   8  norm          5.6326        2.1804        .15504E-05   -1.5233    
   9  Prefactor     .10000E-03    3.8321        .15961E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    19.885        .39915E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          6.0274        4.1058        .15488E-05   -1.5217    
  12  Prefactor     .10000E-03    2.1550        .18795E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.2965        .76891E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.2322        2.7699        .15622E-05   -1.5348    
  15  Prefactor     .24068        30.586        .15877E-05   -1.5610    
  16  norm          .47088        .32876        .15848E-05   -1.5571    
  17  norm          .10000E-03    11.194        .24089E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    4.5872        .22757E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     5.4965        14.366        .15510E-05   -1.5239    
  20  Prefactor     .10000E-03    69.782        .84535E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    3.6437        .13810E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     4.5390        7.6925        .15554E-05   -1.5282    
  23  norm          .10000E-03    2.1799        .17992E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    38.127        .46483E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          2.4450        5.6516        .15670E-05   -1.5395    
  26  Prefactor     .39614        229.81        .15863E-05   -1.5582    
  27  norm          .10000E-03    3.4361        .15289E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10004E-03    41.335        .16330E-05   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          12.727        9.1404        .15262E-05   -1.4994    
  30  Normalizat    1.1568        .27468        .89517E-06   -.87950    
  31  Prefactor     .75677        .29816        .10315E-05   -1.0134    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   3496.911     FROM MIGRAD    STATUS=CONVERGED    597 CALLS     6999 TOTAL
                     EDM=   .53E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    41.947        .36285E-03** at limit **
   2  Prefactor     37.947        25.056        .26022E-05   -.43690E-06
   3  Prefactor     .10000E-03    5.1509        .25988E-03** at limit **
   4  Prefactor     11.624        26.776        .46998E-05   -.48379E-06
   5  Prefactor     .46900        2.1903        .64248E-05    .14864E-05
   6  Prefactor     .10000E-03    17.851        .36285E-03** at limit **
   7  Prefactor     140.32        107.84        .68012E-05     .0000    
   8  norm          5.6326        2.1802        .20442E-05   -.22246E-05
   9  Prefactor     .10000E-03    3.8328        .22464E-03** at limit **
  10  Prefactor     .10000E-03    19.887        .36285E-03** at limit **
  11  norm          6.0274        4.1054        .37607E-05   -.12092E-05
  12  Prefactor     .10000E-03    2.1550        .16955E-03** at limit **
  13  Prefactor     .10000E-03    1.2965        .13109E-03** at limit **
  14  Prefactor     3.2322        2.7687        .34506E-05   -.82367E-05
  15  Prefactor     .24072        30.791        .61486E-03    .59226E-04
  16  norm          .47088        .32846        .10794E-05   -.33074E-04
  17  norm          .10000E-03    11.271        .47966E-03** at limit **
  18  Prefactor     .10000E-03    4.5873        .24721E-03** at limit **
  19  Prefactor     5.4965        14.365        .68545E-05    .33171E-06
  20  Prefactor     .10000E-03    69.793        .36285E-03** at limit **
  21  Prefactor     .10000E-03    3.6438        .22024E-03** at limit **
  22  Prefactor     4.5390        7.4725        .72060E-05   -.14199E-05
  23  norm          .10000E-03    2.1800        .16991E-03** at limit **
  24  Prefactor     .10000E-03    38.143        .36285E-03** at limit **
  25  norm          2.4450        5.6498        .81295E-05    .13984E-05
  26  Prefactor     .39619        220.36        .90465E-03    .18285E-05
  27  norm          .10000E-03    3.4362        .21370E-03** at limit **
  28  norm          .10000E-03    41.622        .39631E-03** at limit **
  29  norm          12.727        9.1021        .44949E-05    .11609E-03
  30  Normalizat    1.1568        .27422        .89535E-05    .11301E-04
  31  Prefactor     .75677        .29806        .12436E-04    .39311E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 37.9469
  Prefactor  = 0.0001
  Prefactor  = 11.6235
  Prefactor  = 0.469005
  Prefactor  = 0.0001
  Prefactor  = 140.321
  norm       = 5.6326
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 6.0274
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 3.23223
  Prefactor  = 0.240721
  norm       = 0.470884
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 5.49647
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.53899
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 2.44504
  Prefactor  = 0.396188
  norm       = 0.0001
  norm       = 0.0001
  norm       = 12.7268
  Normalizat = 1.15676
  Prefactor  = 0.756766
 **********
 **   18 **HESSE 
 **********

 FCN=   3496.911     FROM HESSE     STATUS=OK           592 CALLS     7591 TOTAL
                     EDM=   .92E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    41.948        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     37.947        25.081        .52043E-06   -1.4475    
   3  Prefactor     .10000E-03    5.1509        .51976E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     11.624        26.830        .93996E-06   -1.5026    
   5  Prefactor     .46900        2.1910        .64248E-05   -1.5571    
   6  Prefactor     .10000E-03    17.851        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     140.32        107.84        .68012E-05   -1.3333    
   8  norm          5.6326        2.1809        .40883E-06   -1.5233    
   9  Prefactor     .10000E-03    3.8328        .44928E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    19.887        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          6.0274        4.1062        .75213E-06   -1.5217    
  12  Prefactor     .10000E-03    2.1550        .33909E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    1.2965        .26217E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.2322        2.7691        .69012E-06   -1.5348    
  15  Prefactor     .24072        30.756        .12297E-03   -1.5610    
  16  norm          .47088        .32837        .37124E-06   -1.5571    
  17  norm          .10000E-03    11.274        .95933E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     .10000E-03    4.5873        .49442E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     5.4965        14.371        .13709E-05   -1.5239    
  20  Prefactor     .10000E-03    69.794        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    3.6439        .44049E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     4.5390        7.4195        .14412E-05   -1.5282    
  23  norm          .10000E-03    2.1800        .33982E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    38.144        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          2.4450        5.6494        .16259E-05   -1.5395    
  26  Prefactor     .39619        216.95        .36186E-04   -1.5582    
  27  norm          .10000E-03    3.4362        .42740E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  norm          .10000E-03    41.634        .79262E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  norm          12.727        9.0998        .89897E-06   -1.4994    
  30  Normalizat    1.1568        .27370        .17907E-05   -.87950    
  31  Prefactor     .75677        .29763        .24871E-05   -1.0134    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.16926e-12
Minuit parameter uncertainties:
  1  8.03247e-07
  2  25.0878
  3  3.49746e-08
  4  26.8576
  5  2.0273
  6  1.74322e-07
  7  107.989
  8  2.18096
  9  5.61843e-08
  10  1.70793e-07
  11  4.10639
  12  4.68779e-09
  13  1.48104e-09
  14  2.76919
  15  5.44366
  16  0.32837
  17  5.9619e-06
  18  4.10747e-09
  19  14.3803
  20  7.18191e-07
  21  1.43049e-08
  22  7.42102
  23  2.66764e-08
  24  1.51182e-06
  25  5.65066
  26  18.6079
  27  2.84702e-08
  28  2.12415e-05
  29  9.10076
  30  0.27404
  31  0.298267
Done.

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

Extracting fit parameters...

4FGL J1221.3+3010
   Spectrum: PowerLaw
317    Prefactor:  1.000e-04  1.481e-09  1.000e-04  1.000e+04 ( 1.000e-13)
318        Index:  1.707e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
319        Scale:  4.501e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  7.568e-01  2.983e-01  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.157e+00  2.740e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 185.345 30.168
Photon Flux Upper Limit: 5.81e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.25e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/513111/likelihoodResults_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.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) = 3496.9140867
delta logL = -0.00333279717415

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3496.91075362
delta logL = 2.78416337096e-07

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10015E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    1.6931       1.0000          .0000       10.000    
     3 'Normalizat'    1.1568       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .75677       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6280E+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=   3496.911     FROM MIGRAD    STATUS=CONVERGED     85 CALLS      232 TOTAL
                     EDM=   .12E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10035E-03    18.988        .66164E-03** at limit **
   2  Index         1.6649        5.5181        .50000        .78321E-04
   3  Normalizat    1.1568        .21160E-01    .22384E-03   -.75636E-04
   4  Prefactor     .75677        .24361E-01    .31089E-03   -.52073E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100348
  Index      = 1.66488
  Normalizat = 1.15676
  Prefactor  = 0.756766
 **********
 **   18 **HESSE 
 **********

 FCN=   3496.911     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      261 TOTAL
                     EDM=   .57E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10035E-03    86.010        .13233E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         1.6649        9.1673        .50000       -.73021    
   3  Normalizat    1.1568        .48351E-01    .44767E-04   -.87950    
   4  Prefactor     .75677        .55386E-01    .12436E-04   -1.0134    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.65908e-08
Minuit parameter uncertainties:
  1  0.010962
  2  202.133
  3  0.0483531
  4  0.0553899
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/513111': 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): 102
logL (Free Index) = 3496.91075307
delta logL = 8.29413693282e-07

Extracting fit parameters...

4FGL J1221.3+3010
   Spectrum: PowerLaw
317    Prefactor:  1.003e-04  1.096e-02  1.000e-04  1.000e+04 ( 1.000e-13)
318        Index:  1.665e+00  2.021e+02  0.000e+00  1.000e+01 (-1.000e+00)
319        Scale:  4.501e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
625    Prefactor:  7.568e-01  5.539e-02  0.000e+00  1.000e+01 ( 1.000e+00)
626        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
627        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
624   Normalization:  1.157e+00  4.835e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 185.345 30.168

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/513111/cmap_HighResolution_258768001_259027201_4FGL_J1221.3+3010_daily_bin75.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.25e-03', job_status='DONE', photon_flux_upper_limit='5.81e-08', time_completed='2021-09-05 09:17:04.259968', job_id='513111', GAL2='0.76', fit_tolerance='1e-08', EG2='1.16', EG='1.16', time_epoch_completed='1630858624.26', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.76', dlogl='8.29e-07', ts2='-0.00', photon_index_error='0.00', photon_index='1.71' WHERE bin_id='75' AND source_name='4FGL J1221.3+3010' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep  5 09:17:04 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0280>
Subject: Job 513111: <4FGL_J1221.3+3010_daily_bin75> in cluster <slac> Done

Job <4FGL_J1221.3+3010_daily_bin75> was submitted from host <rhel6-64a> by user <kocevski> in cluster <slac> at Sun Sep  5 09:00:33 2021
Job was executed on host(s) <bullet0280>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep  5 09:00:34 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep  5 09:00:34 2021
Terminated at Sun Sep  5 09:17:05 2021
Results reported at Sun Sep  5 09:17:05 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1221.3+3010_daily_bin75 185.345 30.1677 258768001 259027201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1221.3+3010 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   801.36 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             284.41 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   990 sec.
    Turnaround time :                            992 sec.

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

