aklog: Couldn't determine realm of user:aklog: No credentials cache found  while getting realm
/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 128 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 make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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 = 74098
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J0521.2+1637_monthly_bin178
RA = 80.3136, Dec = 16.631
tmin = 698371201, tmax = 700963201
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='86779', job_status='RUN', time_executed='2023-03-20 02:22:44.743376', time_epoch_executed='1679304164.74' WHERE source_name='4FGL J0521.2+1637' and cadence='monthly' and bin_id='178'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/86779

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

Retrieving the FT1 file...

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

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

Retrieving 457 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/86779/ft1_4FGL_J0521.2+1637_monthly_bin178.fits


Retrieving the FT1 file...

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

Retrieving 457 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/86779/ft1_4FGL_J0521.2+1637_monthly_bin178.fits outfile=/scratch/kocevski/86779/ft1_filteredMKT_4FGL_J0521.2+1637_monthly_bin178.fits ra=80.3136 dec=16.631 rad=12.0 tmin=698371201.0 tmax=700963201.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 33.17
user 32.35
sys 0.75

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

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.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/86779/ft1_filteredMKT_4FGL_J0521.2+1637_monthly_bin178.fits evtable="EVENTS" outfile="/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.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.85
user 0.65
sys 0.19

Number of photons that the gtmktime cut: 27336

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits" evtable="EVENTS" scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits sctable="SC_DATA" outfile=/scratch/kocevski/86779/ltcube_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.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/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits
.....................!
real 112.02
user 111.49
sys 0.34

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits evtable="EVENTS" scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits sctable="SC_DATA" expcube=/scratch/kocevski/86779/ltcube_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits outfile=/scratch/kocevski/86779/expmap_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.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/86779/ltcube_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits
.....................!
real 193.11
user 187.80
sys 4.93

Generating the xml model:
radLim = 0.001
maxRad = 12
normsOnly = True
freeVariableSources = True
Fixing all sources to their catalog values, except variable sources
Creating file and adding sources from 4FGL
Extended source S 147 in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Extended source Rosette in ROI, make sure /nfs/farm/g/glast/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Added 169 point sources and 4 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J0521.2+1637 @ 80.3136 16.631

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits outfile=/scratch/kocevski/86779/cmap_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=160 nypix=160 binsz=0.25 coordsys="CEL" xref=80.3136 yref=16.631 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.81
user 0.67
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits outfile=/scratch/kocevski/86779/cmap_HighResolution_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits algorithm="CMAP" ebinalg="LOG" emin=30.0 emax=200000.0 ebinfile=NONE tbinalg="LIN" tbinfile=NONE nxpix=500 nypix=500 binsz=0.1 coordsys="CEL" xref=80.3136 yref=16.631 axisrot=0.0 rafield="RA" decfield="DEC" proj="AIT" hpx_ordering_scheme="RING" hpx_order=3 hpx_ebin=yes hpx_region="" evtable="EVENTS" sctable="SC_DATA" efield="ENERGY" tfield="TIME" chatter=2 clobber=yes debug=no gui=no mode="ql"

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

This is gtbin version HEAD
real 0.83
user 0.68
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits evtable="EVENTS" scfile=/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/86779/Model_4FGL_J0521.2+1637_monthly_bin178.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
adding source IC 443
adding source Monoceros
adding source Rosette
adding source S 147
Working on...
/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits.....................!
real 6168.64
user 6152.94
sys 3.17

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits', '/scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits', expMap='/scratch/kocevski/86779/expmap_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits', expCube='/scratch/kocevski/86779/ltcube_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/86779/Model_4FGL_J0521.2+1637_monthly_bin178.xml', optimizer='MINUIT')

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

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


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/86779/ft1_filtered_4FGL_J0521.2+1637_monthly_bin178.fits
Spacecraft file(s): /scratch/kocevski/86779/ft2_4FGL_J0521.2+1637_monthly_bin178.fits
Exposure map: /scratch/kocevski/86779/expmap_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits
Exposure cube: /scratch/kocevski/86779/ltcube_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/86779/Model_4FGL_J0521.2+1637_monthly_bin178.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) = 258073.323318

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    1.7781       1.0000          .0000       .10000E+07
     2 'norm      '    .20478E-03   1.0000          .0000       .10000E+07
     3 'Prefactor '    .93724E-03   1.0000          .0000       .10000E+07
     4 'Prefactor '    8.3736       1.0000          .0000       .10000E+07
     5 'Prefactor '    .78718E-05   1.0000          .0000       .10000E+07
     6 'norm      '    4.3273       1.0000          .0000       .10000E+07
     7 'Prefactor '    1.9465       1.0000          .0000       .10000E+07
     8 'norm      '    1.8715       1.0000          .0000       .10000E+07
     9 'Prefactor '    .10721E-03   1.0000          .0000       .10000E+07
    10 'Prefactor '    13.215       1.0000          .0000       .10000E+07
    11 'norm      '    2.7762       1.0000          .0000       .10000E+07
    12 'norm      '    2.2394       1.0000          .0000       .10000E+07
    13 'norm      '    1.2667       1.0000          .0000       .10000E+07
    14 'Prefactor '    1.2686       1.0000         .10000E-03   10000.    
    15 'Prefactor '    2.0171       1.0000          .0000       .10000E+07
    16 'Prefactor '    3.6900       1.0000          .0000       .10000E+07
    17 'Prefactor '    .48282E-05   1.0000          .0000       .10000E+07
    18 'Prefactor '    1.6178       1.0000          .0000       .10000E+07
    19 'Prefactor '    1.0922       1.0000          .0000       .10000E+07
    20 'Normalizat'    1.3161       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .96825       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5910E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   258073.1     FROM MIGRAD    STATUS=CONVERGED    118 CALLS     1329 TOTAL
                     EDM=   .71E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          1.7784        .53695       -.23867E-08    .13323E-03
   2  norm          .49960E-09    11.400       -.19375E-06** at limit **
   3  Prefactor     .49960E-09    7.7390        .31288E-06** at limit **
   4  Prefactor     8.3599        6.0875        .28158E-07    .71151E-03
   5  Prefactor      .0000        .53591        .11514E-07** at limit **
   6  norm          4.3275        .95136       -.70431E-08   -.79262E-02
   7  Prefactor     1.9466        .79574       -.29381E-07   -.17574E-01
   8  norm          1.8712        .86618        .30302E-07    .11576E-01
   9  Prefactor     .16653E-09    2.2813       -.55142E-07** at limit **
  10  Prefactor     13.407        10.251       -.15776E-05   -.60426E-02
  11  norm          2.7761        .59682        .13216E-07    .19606E-01
  12  norm          2.2383        1.6262        .64527E-07    .73922E-02
  13  norm          1.2667        .29197       -.15201E-07   -.70017E-01
  14  Prefactor     1.2686        .36307E-01    .22440E-07    .22179E-01
  15  Prefactor     2.0169        .25675       -.12533E-07   -.71938E-01
  16  Prefactor     3.6819        4.4953       -.19457E-06   -.82982E-02
  17  Prefactor     .61062E-09    5.7431        .19296E-06** at limit **
  18  Prefactor     1.6179        1.2673        .57494E-07    .86613E-02
  19  Prefactor     1.0921        1.6263        .56278E-07    .47041E-02
  20  Normalizat    1.3160        .97239E-01    .12800E-05   -.42407E-03
  21  Prefactor     .96825        .13779E-01   -.22329E-06   -.27410E-02
                               ERR DEF=  .500    
Final values: 
  norm       = 1.77835
  norm       = 4.996e-10
  Prefactor  = 4.996e-10
  Prefactor  = 8.35994
  Prefactor  = 0
  norm       = 4.32754
  Prefactor  = 1.94662
  norm       = 1.8712
  Prefactor  = 1.66533e-10
  Prefactor  = 13.4072
  norm       = 2.77613
  norm       = 2.23832
  norm       = 1.26674
  Prefactor  = 1.26859
  Prefactor  = 2.01693
  Prefactor  = 3.68195
  Prefactor  = 6.10623e-10
  Prefactor  = 1.6179
  Prefactor  = 1.0921
  Normalizat = 1.31604
  Prefactor  = 0.968248
 **********
 **   18 **HESSE 
 **********

 FCN=   258073.1     FROM HESSE     STATUS=OK           377 CALLS     1706 TOTAL
                     EDM=   .34E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          1.7784        .53948        .78467E-03   -1.5681    
   2  norm          .49960E-09    11.340        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .49960E-09    7.7242        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  Prefactor     8.3599        6.1006        .34620E-03   -1.5650    
   5  Prefactor      .0000        .53708        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          4.3275        .95410        .48401E-03   -1.5666    
   7  Prefactor     1.9466        .80167        .74365E-03   -1.5680    
   8  norm          1.8712        .87294        .76102E-03   -1.5681    
   9  Prefactor     .16653E-09    .14471        .72325E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     13.407        10.298        .27529E-03   -1.5635    
  11  norm          2.7761        .59828        .61050E-03   -1.5675    
  12  norm          2.2383        1.6434        .68654E-03   -1.5678    
  13  norm          1.2667        .29557        .98913E-03   -1.5685    
  14  Prefactor     1.2686        .35717E-01    .27642E-02   -1.5483    
  15  Prefactor     2.0169        .25600        .72847E-03   -1.5680    
  16  Prefactor     3.6819        4.5243        .52552E-03   -1.5670    
  17  Prefactor     .61062E-09    5.6885        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  Prefactor     1.6179        1.2867        .83196E-03   -1.5683    
  19  Prefactor     1.0921        1.6381        .11428E-02   -1.5687    
  20  Normalizat    1.3160        .95969E-01    .18340       -.83089    
  21  Prefactor     .96825        .13161E-01    .31678E-01   -.93796    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.36925e-07
Minuit parameter uncertainties:
  1  0.539483
  2  0.000149793
  3  0.000125264
  4  6.10062
  5  2.76435e-06
  6  0.954105
  7  0.801669
  8  0.872942
  9  9.30389e-06
  10  10.298
  11  0.598284
  12  1.64341
  13  0.295568
  14  0.0357165
  15  0.256002
  16  4.52428
  17  0.000119196
  18  1.28665
  19  1.63813
  20  0.095982
  21  0.0131611
Done.

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

Extracting fit parameters...

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

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

EG_v02
   Spectrum: FileFunction
571   Normalization:  1.316e+00  9.598e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.91
Ra Dec: 80.314 16.631
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 1.16e-08 +/- 8.91e-09
Energy Flux (Fixed Index): 4.93e-06 +/- 3.79e-06

TS (Fixed Index): 3.91
Ra Dec: 80.314 16.631
Photon Flux Upper Limit: 3.15e-08 ph cm-2 s-1
Energy Flux Upper Limit: 2.41e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/86779/likelihoodResults_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.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) = 258073.001962
delta logL = 0.122011135914

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 258072.993011
delta logL = 0.130961422023

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   258073.0     FROM MIGRAD    STATUS=CONVERGED     69 CALLS      251 TOTAL
                     EDM=   .94E-11    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     14.989        41.398        .25851E-03    .21391E-03
   2  Index         1.9365        .18652        .50000        .11414E-04
   3  Normalizat    1.3203        .86847E-02    .18316        .88567E-03
   4  Prefactor     .96809        .12964E-02    .31680E-01   -.34769E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 14.9889
  Index      = 1.93646
  Normalizat = 1.32026
  Prefactor  = 0.968092
 **********
 **   18 **HESSE 
 **********

 FCN=   258073.0     FROM HESSE     STATUS=OK            31 CALLS      282 TOTAL
                     EDM=   .22E-12    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     14.989        12.106        .10340E-04   -1.5631    
   2  Index         1.9365        .57498        .68333E-02   -.65948    
   3  Normalizat    1.3203        .88757E-01    .81562E-03   -.82964    
   4  Prefactor     .96809        .13420E-01    .14000E-03   -.93801    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.16205e-13
Minuit parameter uncertainties:
  1  12.1055
  2  0.577032
  3  0.0887672
  4  0.0134203
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/86779': 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) = 258072.993008
delta logL = 0.130964892305

Extracting fit parameters...

4FGL J0521.2+1637
   Spectrum: PowerLaw
242    Prefactor:  1.499e+01  1.211e+01  0.000e+00  1.000e+06 ( 1.000e-14)
243        Index:  1.936e+00  5.770e-01  0.000e+00  1.000e+01 (-1.000e+00)
244        Scale:  2.276e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

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

EG_v02
   Spectrum: FileFunction
571   Normalization:  1.320e+00  8.877e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 4.16
Ra Dec: 80.314 16.631
Photon Index (Free Index): 1.94 +/- 0.58
Photon Flux (Free Index): 6.79e-09 +/- 9.77e-09
Energy Flux (Free Index): 5.52e-06 +/- 4.83e-06

Creating a high resolution counts map...
INFO: Auto-setting vmin to -3.000e-01 [aplpy.core]
INFO: Auto-setting vmax to  3.330e+00 [aplpy.core]
Saving /scratch/kocevski/86779/cmap_HighResolution_698371201_700963201_4FGL_J0521.2+1637_monthly_bin178.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='2.41e-03', comment='SUCCESS', photon_flux='1.16e-08', energy_flux2='5.52e-06', photon_flux_error='8.91e-09', dlogl='1.31e-01', energy_flux='4.93e-06', photon_flux2='6.79e-09', job_status='DONE', time_completed='2023-03-20 06:45:43.203244', photon_index_error2='0.58', photon_index2='1.94', ts='3.91', fit_tolerance='1e-08', GAL='0.97', photon_index_error='0.00', photon_flux_upper_limit='3.15e-08', energy_flux_error2='4.83e-06', EG='1.32', time_epoch_completed='1679319943.2', return_code='0', job_id='86779', GAL2='0.97', EG2='1.32', return_code2='0', energy_flux_error='3.79e-06', photon_flux_error2='9.77e-09', ts2='4.16', photon_index='2.23' WHERE bin_id='178' AND source_name='4FGL J0521.2+1637' AND cadence='monthly';

Database successfully updated.


Analysis Complete.


Mon Mar 20 06:45:43 PDT 2023


------------------------------------------------------------
Sender: LSF System <lsf@bullet0111>
Subject: Job 86779: <4FGL_J0521.2+1637_monthly_bin178> in cluster <slac> Done

Job <4FGL_J0521.2+1637_monthly_bin178> was submitted from host <rhel6-64p> by user <kocevski> in cluster <slac> at Mon Mar 20 02:20:27 2023
Job was executed on host(s) <bullet0111>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Mar 20 02:20:28 2023
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Mar 20 02:20:28 2023
Terminated at Mon Mar 20 06:45:45 2023
Results reported at Mon Mar 20 06:45:45 2023

Your job looked like:

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

Successfully completed.

Resource usage summary:

    CPU time :                                   15735.00 sec.
    Max Memory :                                 721 MB
    Average Memory :                             660.69 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   15916 sec.
    Turnaround time :                            15918 sec.

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

