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


Performing analysis on: 4FGL_J1421.1+3859_daily_bin1523
RA = 215.292, Dec = 38.9966
tmin = 634089601, tmax = 634348801
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='371158', job_status='RUN', time_executed='2021-09-09 11:01:33.716076', time_epoch_executed='1631210493.72' WHERE source_name='4FGL J1421.1+3859' and cadence='daily' and bin_id='1523'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/371158

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/371158/ft1_4FGL_J1421.1+3859_daily_bin1523.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/371158/ft1_4FGL_J1421.1+3859_daily_bin1523.fits outfile=/scratch/kocevski/371158/ft1_filteredMKT_4FGL_J1421.1+3859_daily_bin1523.fits ra=215.292 dec=38.9966 rad=12.0 tmin=634089601.0 tmax=634348801.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.65
user 3.43
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.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/371158/ft1_filteredMKT_4FGL_J1421.1+3859_daily_bin1523.fits evtable="EVENTS" outfile="/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.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.40
user 0.25
sys 0.14

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits" evtable="EVENTS" scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits sctable="SC_DATA" outfile=/scratch/kocevski/371158/ltcube_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.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/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits
.....................!
real 8.75
user 8.44
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits evtable="EVENTS" scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits sctable="SC_DATA" expcube=/scratch/kocevski/371158/ltcube_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits outfile=/scratch/kocevski/371158/expmap_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.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/371158/ltcube_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits
.....................!
real 142.53
user 139.05
sys 3.18

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 181 point sources and 0 extended sources

Setting source of interest to:
4FGL J1421.1+3859 @ 215.292 38.9966

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits outfile=/scratch/kocevski/371158/cmap_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.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=215.292 yref=38.9966 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.44
user 0.30
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits outfile=/scratch/kocevski/371158/cmap_HighResolution_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.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=215.292 yref=38.9966 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.45
user 0.30
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits evtable="EVENTS" scfile=/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/371158/Model_4FGL_J1421.1+3859_daily_bin1523.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/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits.....................!
real 32.74
user 31.65
sys 0.92

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits', '/scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits', expMap='/scratch/kocevski/371158/expmap_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits', expCube='/scratch/kocevski/371158/ltcube_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/371158/Model_4FGL_J1421.1+3859_daily_bin1523.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1421.1+3859'

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  1.965e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
292        Index:  2.670e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/371158/ft1_filtered_4FGL_J1421.1+3859_daily_bin1523.fits
Spacecraft file(s): /scratch/kocevski/371158/ft2_4FGL_J1421.1+3859_daily_bin1523.fits
Exposure map: /scratch/kocevski/371158/expmap_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits
Exposure cube: /scratch/kocevski/371158/ltcube_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/371158/Model_4FGL_J1421.1+3859_daily_bin1523.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) = 5211.5023701

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    55.121       1.0000         .10000E-03   10000.    
     2 'Prefactor '    28.989       1.0000         .10000E-03   10000.    
     3 'norm      '    4.7775       1.0000         .10000E-03   10000.    
     4 'Prefactor '    13.372       1.0000         .10000E-03   10000.    
     5 'norm      '    .10878E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    19.983       1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10012E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    45.268       1.0000         .10000E-03   10000.    
    10 'norm      '    .44969E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    2.3494       1.0000         .10000E-03   10000.    
    14 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    41.709       1.0000         .10000E-03   10000.    
    16 'norm      '    1.3824       1.0000         .10000E-03   10000.    
    17 'Prefactor '    23.363       1.0000         .10000E-03   10000.    
    18 'Prefactor '    8.5651       1.0000         .10000E-03   10000.    
    19 'Prefactor '    50.802       1.0000         .10000E-03   10000.    
    20 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    15.968       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .31995       1.0000         .10000E-03   10000.    
    23 'Prefactor '    4.9240       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    25 'norm      '    .17433       1.0000         .10000E-03   10000.    
    26 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    30 'Normalizat'    .79858       1.0000         .10000E-01   10.000    
    31 'Prefactor '    1.0322       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+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=   5211.501     FROM MIGRAD    STATUS=FAILED      1411 CALLS     5744 TOTAL
                     EDM=   .24E-07    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     55.127        59.220        .54028E-04   -.81644E-05
   2  Prefactor     28.989        33.222        .74411E-04   -.14789E-04
   3  norm          4.7778        1.9305        .60376E-04   -.30090E-03
   4  Prefactor     13.373        5.3724        .50661E-03   -.70089E-03
   5  norm          .10000E-03    31.129        .36285E-03** at limit **
   6  Prefactor     .10000E-03    6.5797        .18064E-02** at limit **
   7  Prefactor     19.992        38.303        .89598E-04    .11039E-04
   8  Prefactor     .10000E-03    6.0734        .33967E-03** at limit **
   9  Prefactor     45.273        24.610        .59591E-04   -.15262E-04
  10  norm          .10000E-03    11.568        .21112E-02** at limit **
  11  Prefactor     .10000E-03    4.5594        .15021E-02** at limit **
  12  Prefactor     .10000E-03    6.0253        .17251E-02** at limit **
  13  Prefactor     2.3487        4.0536        .17748E-03   -.35878E-03
  14  norm          .10000E-03    4.7295        .15329E-02** at limit **
  15  Prefactor     41.713        26.595        .62070E-04   -.46559E-04
  16  norm          1.3827        5.0209        .29308E-03   -.21102E-03
  17  Prefactor     23.370        49.663        .82871E-04   -.46369E-04
  18  Prefactor     8.5713        24.318        .13697E-03    .20999E-04
  19  Prefactor     50.809        37.704        .56266E-04   -.44290E-04
  20  norm          .10000E-03    2.8401        .11879E-02** at limit **
  21  Prefactor     15.970        14.773        .10023E-03   -.33120E-04
  22  Prefactor     .33756        388.43        .54224E-02    .36690E-03
  23  Prefactor     4.9242        4.9495        .15321E-03    .10032E-03
  24  Prefactor     .10000E-03    2.4209        .10966E-02** at limit **
  25  norm          .17530        1.4868        .12981E-02    .14763E-02
  26  norm          .10000E-03    2.9386        .11937E-02** at limit **
  27  Prefactor     .10000E-03    8.4311        .18142E-02** at limit **
  28  Prefactor     .10000E-03    22.292        .18142E-02** at limit **
  29  Prefactor     .10000E-03    11.205        .18142E-02** at limit **
  30  Normalizat    .79854        .21946        .24269E-03   -.36492E-03
  31  Prefactor     1.0321        .23977        .25570E-03   -.30182E-03
                               ERR DEF=  .500    
 START SIMPLEX MINIMIZATION.    CONVERGENCE WHEN EDM .LT.   .20E-04
 SIMPLEX MINIMIZATION HAS CONVERGED.

 FCN=   5211.501     FROM SIMPLEX   STATUS=PROGRESS    1447 CALLS     7191 TOTAL
                     EDM=   .19E-04    STRATEGY= 1      ERR MATRIX APPROXIMATE

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     55.127        59.220        .24220E-06   -1.4222    
   2  Prefactor     28.989        33.222        .24618E-06   -1.4631    
   3  norm          4.7778        1.9305        .25338E-06   -1.5271    
   4  Prefactor     13.373        5.3724        .24584E-06   -1.4976    
   5  norm          .10000E-03    31.129        .61555E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.5797        .17414E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     19.992        38.303        .23319E-06   -1.4813    
   8  Prefactor     .10000E-03    6.0734        .43658E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     45.273        24.610        .22008E-06   -1.4361    
  10  norm          .10000E-03    11.568        .40231E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.5594        .28856E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.0253        .28189E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     2.3487        4.0536        .24644E-06   -1.5401    
  14  norm          .10000E-03    4.7295        .38662E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     41.713        26.595        .22987E-06   -1.4415    
  16  norm          1.3827        5.0209        .24620E-06   -1.5473    
  17  Prefactor     23.370        49.663        .23405E-06   -1.4741    
  18  Prefactor     8.5713        24.318        .24101E-06   -1.5122    
  19  Prefactor     50.809        37.704        .22814E-06   -1.4281    
  20  norm          .10000E-03    2.8401        .28592E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     15.970        14.773        .23861E-06   -1.4908    
  22  Prefactor     .33756        388.43        .24953E-06   -1.5592    
  23  Prefactor     4.9242        4.9495        .24430E-06   -1.5264    
  24  Prefactor     .10000E-03    2.4209        .77042E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .17530        1.4868        .25006E-06   -1.5624    
  26  norm          .10000E-03    2.9386        .20751E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    8.4311        .24498E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    22.292        .86899E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    11.205        .25235E-06   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .79854        .21946        .16025E-06   -1.0012    
  31  Prefactor     1.0321        .23977        .14671E-06   -.91668    
                               ERR DEF=  .500    

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   5211.501     FROM MIGRAD    STATUS=CONVERGED    599 CALLS     7790 TOTAL
                     EDM=   .34E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     55.127        59.215        .10806E-04    .84169E-07
   2  Prefactor     28.989        33.220        .14882E-04    .15278E-06
   3  norm          4.7778        1.9299        .24150E-05    .94149E-06
   4  Prefactor     13.373        5.3715        .20264E-04    .22441E-05
   5  norm          .10000E-03    31.131        .72569E-04** at limit **
   6  Prefactor     .10000E-03    6.5803        .36128E-03** at limit **
   7  Prefactor     19.992        38.300        .35839E-05   -.63443E-06
   8  Prefactor     .10000E-03    6.0738        .67934E-04** at limit **
   9  Prefactor     45.273        24.607        .23836E-05   -.95390E-06
  10  norm          .10000E-03    11.637        .42224E-03** at limit **
  11  Prefactor     .10000E-03    4.5599        .30043E-03** at limit **
  12  Prefactor     .10000E-03    6.0266        .34502E-03** at limit **
  13  Prefactor     2.3487        4.0510        .70991E-05    .12171E-04
  14  norm          .10000E-03    4.7296        .30659E-03** at limit **
  15  Prefactor     41.713        26.595        .12414E-04    .10990E-05
  16  norm          1.3828        5.0191        .11723E-04    .40729E-05
  17  Prefactor     23.370        49.658        .33148E-05    .68593E-06
  18  Prefactor     8.5712        23.783        .54788E-05   -.37351E-05
  19  Prefactor     50.809        37.696        .11253E-04    .14144E-05
  20  norm          .10000E-03    2.8401        .23759E-03** at limit **
  21  Prefactor     15.970        14.766        .40092E-05    .79398E-05
  22  Prefactor     .33764        383.37        .10845E-02    .14515E-04
  23  Prefactor     4.9242        4.9422        .61286E-05    .15953E-04
  24  Prefactor     .10000E-03    2.4209        .21932E-03** at limit **
  25  norm          .17527        1.4773        .51926E-04   -.56925E-05
  26  norm          .10000E-03    2.9398        .23873E-03** at limit **
  27  Prefactor     .10000E-03    8.4366        .36285E-03** at limit **
  28  Prefactor     .10000E-03    22.292        .36285E-03** at limit **
  29  Prefactor     .10000E-03    11.206        .36285E-03** at limit **
  30  Normalizat    .79854        .21883        .48539E-04    .16817E-04
  31  Prefactor     1.0321        .23980        .51141E-04    .14850E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 55.1272
  Prefactor  = 28.989
  norm       = 4.77775
  Prefactor  = 13.3727
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 19.9917
  Prefactor  = 0.0001
  Prefactor  = 45.2731
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 2.34873
  norm       = 0.0001
  Prefactor  = 41.7126
  norm       = 1.38276
  Prefactor  = 23.3701
  Prefactor  = 8.57119
  Prefactor  = 50.8086
  norm       = 0.0001
  Prefactor  = 15.9703
  Prefactor  = 0.337636
  Prefactor  = 4.92423
  Prefactor  = 0.0001
  norm       = 0.175272
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 0.798537
  Prefactor  = 1.03208
 **********
 **   18 **HESSE 
 **********

 FCN=   5211.501     FROM HESSE     STATUS=OK           592 CALLS     8382 TOTAL
                     EDM=   .93E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     55.127        59.211        .10806E-04   -1.4222    
   2  Prefactor     28.989        33.224        .29765E-05   -1.4631    
   3  norm          4.7778        1.9299        .48301E-06   -1.5271    
   4  Prefactor     13.373        5.3717        .81058E-06   -1.4976    
   5  norm          .10000E-03    31.132        .14514E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    6.5803        .72256E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     19.992        38.031        .71678E-06   -1.4813    
   8  Prefactor     .10000E-03    6.0738        .13587E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     45.273        24.514        .47673E-06   -1.4361    
  10  norm          .10000E-03    11.640        .84449E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    4.5599        .60086E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    6.0267        .69004E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     2.3487        4.0507        .14198E-05   -1.5401    
  14  norm          .10000E-03    4.7296        .61317E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     41.713        26.603        .24828E-05   -1.4415    
  16  norm          1.3828        5.0174        .23447E-05   -1.5473    
  17  Prefactor     23.370        50.217        .66297E-06   -1.4741    
  18  Prefactor     8.5712        23.716        .10958E-05   -1.5122    
  19  Prefactor     50.809        37.682        .22506E-05   -1.4281    
  20  norm          .10000E-03    2.8401        .47517E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     15.970        14.767        .80184E-06   -1.4908    
  22  Prefactor     .33764        379.69        .21689E-03   -1.5592    
  23  Prefactor     4.9242        4.9431        .12257E-05   -1.5264    
  24  Prefactor     .10000E-03    2.4209        .43865E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  norm          .17527        1.4769        .20770E-05   -1.5624    
  26  norm          .10000E-03    2.9398        .47747E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     .10000E-03    8.4368        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  28  Prefactor     .10000E-03    22.292        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     .10000E-03    11.206        .72569E-04   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  30  Normalizat    .79854        .21871        .97077E-05   -1.0012    
  31  Prefactor     1.0321        .23984        .10228E-04   -.91668    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.29596e-13
Minuit parameter uncertainties:
  1  59.2747
  2  33.2455
  3  1.92989
  4  5.37193
  5  1.26804e-06
  6  2.82758e-07
  7  38.0775
  8  5.70806e-08
  9  24.5195
  10  5.89286e-06
  11  3.7122e-07
  12  6.10154e-07
  13  4.05114
  14  1.52777e-07
  15  26.6108
  16  5.01893
  17  50.308
  18  23.742
  19  37.6994
  20  6.086e-08
  21  14.7706
  22  22.7876
  23  4.94352
  24  7.88731e-08
  25  1.0173
  26  2.26765e-07
  27  8.9936e-07
  28  9.92747e-07
  29  2.94883e-07
  30  0.218955
  31  0.240093
Done.

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

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  1.000e-04  6.102e-07  1.000e-04  1.000e+04 ( 1.000e-13)
292        Index:  2.670e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.032e+00  2.401e-01  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  7.985e-01  2.190e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 215.292 38.997
Photon Flux Upper Limit: 5.10e-08 ph cm-2 s-1
Energy Flux Upper Limit: 4.01e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/371158/likelihoodResults_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.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): 102
logL (Free Index) = 5211.50218863
delta logL = -0.000789839590652

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 5211.50139877
delta logL = 1.78215486812e-08

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10095E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.6524       1.0000          .0000       10.000    
     3 'Normalizat'    .79856       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0321       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5840E+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=   5211.501     FROM MIGRAD    STATUS=CONVERGED     89 CALLS      237 TOTAL
                     EDM=   .11E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10436E-03    4.0361        .17473E-01** at limit **
   2  Index         2.4957        5.5645        .50000        .20064E-04
   3  Normalizat    .79854        .32244E-02    .24270E-03    .64644E-05
   4  Prefactor     1.0321        .38381E-02    .25570E-03    .85364E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000104359
  Index      = 2.49571
  Normalizat = 0.798537
  Prefactor  = 1.03208
 **********
 **   18 **HESSE 
 **********

 FCN=   5211.501     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      266 TOTAL
                     EDM=   .28E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10436E-03    121.13        .18199E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.4957        7.2229        .50000       -.52459    
   3  Normalizat    .79854        .17883E-01    .97079E-05   -1.0012    
   4  Prefactor     1.0321        .21286E-01    .10228E-04   -.91668    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 2.84151e-08
Minuit parameter uncertainties:
  1  0.0460527
  2  747.219
  3  0.0178826
  4  0.0212861
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/371158': 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) = 5211.5013982
delta logL = 5.87688191445e-07

Extracting fit parameters...

4FGL J1421.1+3859
   Spectrum: PowerLaw
291    Prefactor:  1.044e-04  4.605e-02  1.000e-04  1.000e+04 ( 1.000e-13)
292        Index:  2.496e+00  7.472e+02  0.000e+00  1.000e+01 (-1.000e+00)
293        Scale:  9.266e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
581    Prefactor:  1.032e+00  2.129e-02  0.000e+00  1.000e+01 ( 1.000e+00)
582        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
583        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
580   Normalization:  7.985e-01  1.788e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 215.292 38.997

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/371158/cmap_HighResolution_634089601_634348801_4FGL_J1421.1+3859_daily_bin1523.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='4.01e-03', job_status='DONE', photon_flux_upper_limit='5.10e-08', time_completed='2021-09-09 11:14:30.521196', job_id='371158', GAL2='1.03', fit_tolerance='1e-08', EG2='0.80', EG='0.80', time_epoch_completed='1631211270.52', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='1.03', dlogl='5.88e-07', ts2='-0.00', photon_index_error='0.00', photon_index='2.67' WHERE bin_id='1523' AND source_name='4FGL J1421.1+3859' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep  9 11:14:30 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0071>
Subject: Job 371158: <4FGL_J1421.1+3859_daily_bin1523> in cluster <slac> Done

Job <4FGL_J1421.1+3859_daily_bin1523> was submitted from host <rhel6-64f> by user <kocevski> in cluster <slac> at Thu Sep  9 11:01:19 2021
Job was executed on host(s) <bullet0071>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep  9 11:01:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep  9 11:01:20 2021
Terminated at Thu Sep  9 11:14:31 2021
Results reported at Thu Sep  9 11:14:31 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1421.1+3859_daily_bin1523 215.292 38.9966 634089601 634348801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1421.1+3859 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   770.32 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             329.85 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   790 sec.
    Turnaround time :                            792 sec.

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

