/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 171 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 = 29
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J2121.0+1901_daily_bin478
RA = 320.26, Dec = 19.0324
tmin = 363225601, tmax = 363484801
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='466725', job_status='RUN', time_executed='2021-09-26 12:13:54.362602', time_epoch_executed='1632683634.36' WHERE source_name='4FGL J2121.0+1901' and cadence='daily' and bin_id='478'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/466725

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/466725/ft1_4FGL_J2121.0+1901_daily_bin478.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/466725/ft1_4FGL_J2121.0+1901_daily_bin478.fits outfile=/scratch/kocevski/466725/ft1_filteredMKT_4FGL_J2121.0+1901_daily_bin478.fits ra=320.26 dec=19.0324 rad=12.0 tmin=363225601.0 tmax=363484801.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 5.88
user 5.49
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.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/466725/ft1_filteredMKT_4FGL_J2121.0+1901_daily_bin478.fits evtable="EVENTS" outfile="/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.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.29
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits" evtable="EVENTS" scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits sctable="SC_DATA" outfile=/scratch/kocevski/466725/ltcube_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.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/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits
.....................!
real 12.59
user 12.20
sys 0.29

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits evtable="EVENTS" scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits sctable="SC_DATA" expcube=/scratch/kocevski/466725/ltcube_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits outfile=/scratch/kocevski/466725/expmap_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.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/466725/ltcube_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits
.....................!
real 157.51
user 152.17
sys 4.21

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 Cygnus Loop in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_archive_v18/Templates/CygnusLoop.fits is the correct path to the extended template.
Added 193 point sources and 1 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 J2121.0+1901 @ 320.26 19.0324

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits outfile=/scratch/kocevski/466725/cmap_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.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=320.26 yref=19.0324 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.52
user 0.32
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits outfile=/scratch/kocevski/466725/cmap_HighResolution_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.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=320.26 yref=19.0324 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.49
user 0.33
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits evtable="EVENTS" scfile=/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/466725/Model_4FGL_J2121.0+1901_daily_bin478.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source Cygnus Loop
adding source EG_v02
adding source GAL_V02
Working on...
/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits.....................!
real 99.32
user 95.49
sys 1.13

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits', '/scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits', expMap='/scratch/kocevski/466725/expmap_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits', expCube='/scratch/kocevski/466725/ltcube_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/466725/Model_4FGL_J2121.0+1901_daily_bin478.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J2121.0+1901'

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  3.670e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
391        alpha:  2.156e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
392         beta:  5.740e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/466725/ft1_filtered_4FGL_J2121.0+1901_daily_bin478.fits
Spacecraft file(s): /scratch/kocevski/466725/ft2_4FGL_J2121.0+1901_daily_bin478.fits
Exposure map: /scratch/kocevski/466725/expmap_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits
Exposure cube: /scratch/kocevski/466725/ltcube_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/466725/Model_4FGL_J2121.0+1901_daily_bin478.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) = 6652.30383217

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    6.3793       1.0000         .10000E-03   10000.    
     2 'norm      '    13.375       1.0000         .10000E-03   10000.    
     3 'norm      '    21.883       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    153.53       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .19868E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    4.4154       1.0000         .10000E-03   10000.    
    10 'Prefactor '    21.899       1.0000         .10000E-03   10000.    
    11 'Prefactor '    6.7805       1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    4.1405       1.0000         .10000E-03   10000.    
    14 'norm      '    10.970       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    18 'norm      '    3.0795       1.0000         .10000E-03   10000.    
    19 'Prefactor '    .10416E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .12916E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    .10608E-03   1.0000         .10000E-03   10000.    
    22 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    23 'norm      '    .22224       1.0000         .10000E-03   10000.    
    24 'Normalizat'    1.3688       1.0000         .10000E-01   10.000    
    25 'Prefactor '    .80084       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6610E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   6652.278     FROM MIGRAD    STATUS=CONVERGED    583 CALLS     2951 TOTAL
                     EDM=   .12E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          6.3793        11.535        .34671E-05   -.13161E-03
   2  norm          13.376        12.379        .82776E-06   -.54274E-04
   3  norm          21.877        56.212       -.63023E-07   -.14074E-04
   4  Prefactor     .10000E-03    4.6308       -.19956E-07** at limit **
   5  Prefactor     .10000E-03    8.3700        .32822E-07** at limit **
   6  Prefactor     153.54        88.282        .34866E-06    .22166E-04
   7  Prefactor     .10000E-03    16.582       -.59761E-06** at limit **
   8  Prefactor     .10000E-03    31.433        .15345E-06** at limit **
   9  Prefactor     4.3723        20.746        .28461E-07    .17822E-04
  10  Prefactor     21.902        28.553        .63178E-07    .42677E-05
  11  Prefactor     6.7811        4.9612        .68440E-07   -.66190E-04
  12  Prefactor     .10000E-03    10.374        .31233E-07** at limit **
  13  norm          4.1407        4.3875        .89273E-07    .15616E-04
  14  norm          10.970        7.4475        .11373E-06   -.20538E-04
  15  Prefactor     .10000E-03    2.6862        .13974E-07** at limit **
  16  Prefactor     .10000E-03    5.3211       -.24272E-08** at limit **
  17  Prefactor     .10000E-03    40.058       -.39228E-06** at limit **
  18  norm          3.0774        2.6122        .18926E-06   -.14096E-03
  19  Prefactor     .10000E-03    108.92       -.14449E-05** at limit **
  20  norm          .10000E-03    1.6994       -.16515E-07** at limit **
  21  Prefactor     .10000E-03    60.521        .15116E-05** at limit **
  22  Prefactor     .10000E-03    18.402        .59646E-06** at limit **
  23  norm          .22186        .81678        .83526E-06   -.17078E-03
  24  Normalizat    1.3687        .26947       -.54281E-06   -.42946E-04
  25  Prefactor     .80085        .97679E-01   -.24223E-06   -.52311E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 6.37931
  norm       = 13.3758
  norm       = 21.8774
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 153.537
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 4.3723
  Prefactor  = 21.9017
  Prefactor  = 6.78115
  Prefactor  = 0.0001
  norm       = 4.1407
  norm       = 10.9699
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 3.07743
  Prefactor  = 0.000100005
  norm       = 0.0001
  Prefactor  = 0.000100004
  Prefactor  = 0.000100001
  norm       = 0.221856
  Normalizat = 1.36866
  Prefactor  = 0.800848
 **********
 **   18 **HESSE 
 **********

 FCN=   6652.278     FROM HESSE     STATUS=OK           427 CALLS     3378 TOTAL
                     EDM=   .26E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          6.3793        11.537        .79457E-03   -1.5203    
   2  norm          13.376        12.385        .54763E-03   -1.4976    
   3  norm          21.877        56.302        .85625E-04   -1.4772    
   4  Prefactor     .10000E-03    4.6344        .17141E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .10000E-03    8.3845        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     153.54        88.287        .32533E-04   -1.3223    
   7  Prefactor     .10000E-03    16.739        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    31.513        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     4.3723        20.641        .19165E-03   -1.5290    
  10  Prefactor     21.902        28.541        .85594E-04   -1.4772    
  11  Prefactor     6.7811        4.9555        .14550E-03   -1.5187    
  12  Prefactor     .10000E-03    10.378        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          4.1407        4.3829        .16678E-03   -1.5301    
  14  norm          10.970        7.4528        .12096E-03   -1.5045    
  15  Prefactor     .10000E-03    2.7169        .13053E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    5.3675        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     .10000E-03    40.061        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          3.0774        2.6051        .11589E-03   -1.5357    
  19  Prefactor     .10000E-03    109.11        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    3.4192        .20631E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .10000E-03    60.915        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     .10000E-03    18.408        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  norm          .22186        .81231        .13709E-03   -1.5614    
  24  Normalizat    1.3687        .32088        .35570E-03   -.81540    
  25  Prefactor     .80085        .11702        .16640E-03   -.99697    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.61432e-10
Minuit parameter uncertainties:
  1  11.5409
  2  12.3877
  3  56.4393
  4  9.46084e-07
  5  8.94548e-07
  6  88.3635
  7  0.00016769
  8  0.000143681
  9  19.0106
  10  28.5584
  11  4.9558
  12  1.177e-05
  13  4.38322
  14  7.45342
  15  2.08361e-06
  16  1.12965e-06
  17  0.000255782
  18  2.6052
  19  0.0014223
  20  2.08156e-05
  21  0.000932219
  22  0.000250761
  23  0.812354
  24  0.321347
  25  0.117053
Done.

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

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  1.097e+01  7.453e+00  1.000e-04  1.000e+04 ( 1.000e-12)
391        alpha:  2.156e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
392         beta:  5.740e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
658    Prefactor:  8.008e-01  1.171e-01  0.000e+00  1.000e+01 ( 1.000e+00)
659        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
660        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
657   Normalization:  1.369e+00  3.213e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.08
Ra Dec: 320.260 19.032
Photon Index (Fixed Index): 2.16 +/- 0.00
Photon Flux (Fixed Index): 8.96e-08 +/- 6.09e-08
Energy Flux (Fixed Index): 4.10e-05 +/- 2.79e-05

TS (Fixed Index): 3.08
Ra Dec: 320.260 19.032
Photon Flux Upper Limit: 2.07e-07 ph cm-2 s-1
Energy Flux Upper Limit: 9.49e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/466725/likelihoodResults_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.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) = 6650.16640211
delta logL = 2.11189006992

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 6650.15121505
delta logL = 2.12707712223

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    3.5490       1.0000         .10000E-03   10000.    
     2 'alpha     '    3.4576       1.0000          .0000       5.0000    
     3 'Normalizat'    1.1883       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .84273       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6610E+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=   6650.151     FROM MIGRAD    STATUS=CONVERGED     79 CALLS      282 TOTAL
                     EDM=   .25E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          3.5488        6.7317        .61681E-04    .13132E-02
   2  alpha         3.4576        1.0829        .79730E-02    .73255E-04
   3  Normalizat    1.1883        .32851        .37662E-03   -.73382E-04
   4  Prefactor     .84273        .11912        .16237E-03   -.12803E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 3.54879
  alpha      = 3.45764
  Normalizat = 1.18831
  Prefactor  = 0.842725
 **********
 **   18 **HESSE 
 **********

 FCN=   6650.151     FROM HESSE     STATUS=OK            25 CALLS      307 TOTAL
                     EDM=   .23E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          3.5488        4.3584        .24672E-05   -1.5331    
   2  alpha         3.4576        .71693        .31892E-03    .39310    
   3  Normalizat    1.1883        .32586        .15065E-04   -.86965    
   4  Prefactor     .84273        .11794        .32474E-04   -.98172    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.34211e-10
Minuit parameter uncertainties:
  1  4.35882
  2  0.728979
  3  0.326414
  4  0.11798
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/466725': 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) = 6650.15121505
delta logL = 2.12707712441

Extracting fit parameters...

4FGL J2121.0+1901
   Spectrum: LogParabola
390         norm:  3.549e+00  4.359e+00  1.000e-04  1.000e+04 ( 1.000e-12)
391        alpha:  3.458e+00  7.290e-01  0.000e+00  5.000e+00 ( 1.000e+00)
392         beta:  5.740e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
393           Eb:  8.783e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
658    Prefactor:  8.427e-01  1.180e-01  0.000e+00  1.000e+01 ( 1.000e+00)
659        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
660        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
657   Normalization:  1.188e+00  3.264e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 7.78
Ra Dec: 320.260 19.032
Photon Index (Free Index): 3.46 +/- 0.73
Photon Flux (Free Index): 2.20e-07 +/- 9.91e-08
Energy Flux (Free Index): 3.84e-05 +/- 1.71e-05

Creating a high resolution counts map...
INFO: Auto-setting vmin to -1.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  1.110e+00 [aplpy.core]
Saving /scratch/kocevski/466725/cmap_HighResolution_363225601_363484801_4FGL_J2121.0+1901_daily_bin478.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='9.49e-05', comment='SUCCESS', photon_flux='8.96e-08', energy_flux2='3.84e-05', photon_flux_error='6.09e-08', dlogl='2.13e+00', energy_flux='4.10e-05', photon_flux2='2.20e-07', job_status='DONE', time_completed='2021-09-26 12:26:29.781735', photon_index_error2='0.73', photon_index2='3.46', ts='3.08', fit_tolerance='1e-08', GAL='0.80', photon_index_error='0.00', photon_flux_upper_limit='2.07e-07', energy_flux_error2='1.71e-05', EG='1.37', time_epoch_completed='1632684389.78', return_code='0', job_id='466725', GAL2='0.84', EG2='1.19', return_code2='0', energy_flux_error='2.79e-05', photon_flux_error2='9.91e-08', ts2='7.78', photon_index='2.16' WHERE bin_id='478' AND source_name='4FGL J2121.0+1901' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sun Sep 26 12:26:29 PDT 2021


------------------------------------------------------------
Sender: LSF System <scs@bullet0175>
Subject: Job 466725: <4FGL_J2121.0+1901_daily_bin478> in cluster <slac> Done

Job <4FGL_J2121.0+1901_daily_bin478> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Sun Sep 26 12:10:26 2021
Job was executed on host(s) <bullet0175>, in queue <medium>, as user <kocevski> in cluster <slac> at Sun Sep 26 12:10:52 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sun Sep 26 12:10:52 2021
Terminated at Sun Sep 26 12:26:30 2021
Results reported at Sun Sep 26 12:26:30 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J2121.0+1901_daily_bin478 320.26 19.0324 363225601 363484801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J2121.0+1901 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   746.00 sec.
    Max Memory :                                 1257 MB
    Average Memory :                             312.44 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   938 sec.
    Turnaround time :                            964 sec.

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

