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


Performing analysis on: 4FGL_J0904.6+5200_daily_bin1458
RA = 136.154, Dec = 52.0096
tmin = 617241601, tmax = 617500801
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='987888', job_status='RUN', time_executed='2021-08-30 23:40:38.044586', time_epoch_executed='1630392038.04' WHERE source_name='4FGL J0904.6+5200' and cadence='daily' and bin_id='1458'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/987888

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

Retrieving the FT1 file...

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

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

Retrieving 47 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/987888/ft1_4FGL_J0904.6+5200_daily_bin1458.fits


Retrieving the FT1 file...

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

Retrieving 47 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/987888/ft1_4FGL_J0904.6+5200_daily_bin1458.fits outfile=/scratch/kocevski/987888/ft1_filteredMKT_4FGL_J0904.6+5200_daily_bin1458.fits ra=136.154 dec=52.0096 rad=12.0 tmin=617241601.0 tmax=617500801.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.24
user 2.72
sys 0.44

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.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/987888/ft1_filteredMKT_4FGL_J0904.6+5200_daily_bin1458.fits evtable="EVENTS" outfile="/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.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.72
user 0.31
sys 0.37

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits" evtable="EVENTS" scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits sctable="SC_DATA" outfile=/scratch/kocevski/987888/ltcube_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.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/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits
.....................!
real 13.08
user 12.38
sys 0.61

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits evtable="EVENTS" scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits sctable="SC_DATA" expcube=/scratch/kocevski/987888/ltcube_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits outfile=/scratch/kocevski/987888/expmap_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.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/987888/ltcube_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits
.....................!
real 194.67
user 185.84
sys 6.94

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

Setting source of interest to:
4FGL J0904.6+5200 @ 136.154 52.0096

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits outfile=/scratch/kocevski/987888/cmap_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.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=136.154 yref=52.0096 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.75
user 0.35
sys 0.37

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits outfile=/scratch/kocevski/987888/cmap_HighResolution_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.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=136.154 yref=52.0096 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.76
user 0.37
sys 0.37

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits evtable="EVENTS" scfile=/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/987888/Model_4FGL_J0904.6+5200_daily_bin1458.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/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits.....................!
real 38.62
user 36.52
sys 1.71

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits', '/scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits', expMap='/scratch/kocevski/987888/expmap_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits', expCube='/scratch/kocevski/987888/ltcube_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/987888/Model_4FGL_J0904.6+5200_daily_bin1458.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0904.6+5200'

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.897e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-13)
354        Index:  2.565e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/987888/ft1_filtered_4FGL_J0904.6+5200_daily_bin1458.fits
Spacecraft file(s): /scratch/kocevski/987888/ft2_4FGL_J0904.6+5200_daily_bin1458.fits
Exposure map: /scratch/kocevski/987888/expmap_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits
Exposure cube: /scratch/kocevski/987888/ltcube_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/987888/Model_4FGL_J0904.6+5200_daily_bin1458.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) = 3014.4413906

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    10000.       1.0000         .10000E-03   10000.    
     2 'Prefactor '    10000.       1.0000         .10000E-03   10000.    
     3 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     4 'norm      '    25.364       1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    .10134E-03   1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    5.6539       1.0000         .10000E-03   10000.    
    12 'norm      '    .10001E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    16 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    30.009       1.0000         .10000E-03   10000.    
    18 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    .10009E-03   1.0000         .10000E-03   10000.    
    20 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    21 'Prefactor '    4.1295       1.0000         .10000E-03   10000.    
    22 'Prefactor '    5.7009       1.0000         .10000E-03   10000.    
    23 'Prefactor '    25.663       1.0000         .10000E-03   10000.    
    24 'Prefactor '    .12142E-03   1.0000         .10000E-03   10000.    
    25 'Prefactor '    8.9426       1.0000         .10000E-03   10000.    
    26 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    27 'Prefactor '    64.015       1.0000         .10000E-03   10000.    
    28 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    29 'Prefactor '    6.9340       1.0000         .10000E-03   10000.    
    30 'norm      '    .10003E-03   1.0000         .10000E-03   10000.    
    31 'Prefactor '    50.070       1.0000         .10000E-03   10000.    
    32 'norm      '    2.3079       1.0000         .10000E-03   10000.    
    33 'norm      '    26.761       1.0000         .10000E-03   10000.    
    34 'Prefactor '    1.2379       1.0000         .10000E-03   10000.    
    35 'norm      '    7.7272       1.0000         .10000E-03   10000.    
    36 'Prefactor '    .10020E-03   1.0000         .10000E-03   10000.    
    37 'Normalizat'    .81433       1.0000         .10000E-01   10.000    
    38 'Prefactor '    .77616       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7190E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   3014.409     FROM MIGRAD    STATUS=CONVERGED   1109 CALLS     6889 TOTAL
                     EDM=   .11E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm         10000.0        297.76        .19898E-03** at limit **
   2  Prefactor     10000.        1051.8        .13059E-02** at limit **
   3  Prefactor     .10000E-03    30.221        .36613E-05** at limit **
   4  norm          25.365        24.897       -.58518E-06   -.24662E-04
   5  norm          .10000E-03    6.9845        .37543E-05** at limit **
   6  Prefactor     .10000E-03    10.432       -.32949E-05** at limit **
   7  Prefactor     .10000E-03    2.9665       -.19495E-06** at limit **
   8  Prefactor     .10000E-03    200.94        .19600E-03** at limit **
   9  Prefactor     .10000E-03    20.078        .10141E-04** at limit **
  10  Prefactor     .10000E-03    6.0447       -.64880E-06** at limit **
  11  norm          5.6539        8.2109       -.29041E-06   -.60337E-03
  12  norm          .10000E-03    4.1604        .17789E-06** at limit **
  13  Prefactor     .10000E-03    7.4924       -.45186E-05** at limit **
  14  Prefactor     .10000E-03    8.5975       -.17218E-05** at limit **
  15  Prefactor     .10000E-03    4.6728        .12911E-06** at limit **
  16  Prefactor     .10000E-03    18.968       -.97983E-05** at limit **
  17  Prefactor     29.986        86.276       -.32728E-04    .53728E-06
  18  Prefactor     .10000E-03    3.7681       -.16574E-06** at limit **
  19  norm          .10000E-03    .53411        .23300E-06** at limit **
  20  norm          .10000E-03    .32848       -.62689E-07** at limit **
  21  Prefactor     4.1317        4.4601       -.61493E-06   -.47467E-03
  22  Prefactor     5.7003        5.6515        .14654E-06   -.15417E-03
  23  Prefactor     25.668        16.709       -.56262E-06   -.18454E-03
  24  Prefactor     .10000E-03    5.7864        .21549E-05** at limit **
  25  Prefactor     8.9384        27.932        .35140E-05   -.69547E-04
  26  Prefactor     .10000E-03    3.4337        .61651E-08** at limit **
  27  Prefactor     64.002        70.599       -.11008E-04   -.77490E-05
  28  Prefactor     .10000E-03    2.9675        .48530E-07** at limit **
  29  Prefactor     6.9452        10.909       -.12258E-05   -.45008E-03
  30  norm          .10000E-03    9.1136        .26151E-05** at limit **
  31  Prefactor     50.057        33.816       -.73099E-06   -.41781E-04
  32  norm          2.3078        .74443       -.43499E-07   -.10200E-03
  33  norm          26.751        21.198        .42942E-05    .24168E-04
  34  Prefactor     1.2330        8.1314       -.28710E-05   -.65436E-03
  35  norm          7.7265        3.8977       -.38072E-06    .60938E-04
  36  Prefactor     .10000E-03    42.176       -.11688E-04** at limit **
  37  Normalizat    .81499        .27561        .29119E-05   -.14677E-03
  38  Prefactor     .77577        .24122       -.70479E-06   -.31069E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 10000
  Prefactor  = 10000
  Prefactor  = 0.0001
  norm       = 25.3649
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 5.65386
  norm       = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Prefactor  = 29.986
  Prefactor  = 0.0001
  norm       = 0.0001
  norm       = 0.0001
  Prefactor  = 4.1317
  Prefactor  = 5.70026
  Prefactor  = 25.6678
  Prefactor  = 0.000100003
  Prefactor  = 8.93843
  Prefactor  = 0.0001
  Prefactor  = 64.0022
  Prefactor  = 0.0001
  Prefactor  = 6.94522
  norm       = 0.0001
  Prefactor  = 50.0566
  norm       = 2.30777
  norm       = 26.7512
  Prefactor  = 1.23302
  norm       = 7.72651
  Prefactor  = 0.0001
  Normalizat = 0.814993
  Prefactor  = 0.775772
 **********
 **   18 **HESSE 
 **********

 FCN=   3014.409     FROM HESSE     STATUS=OK           884 CALLS     7773 TOTAL
                     EDM=   .23E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm         10000.0        297.86        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     10000.        1051.2        .18142E-02    1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Prefactor     .10000E-03    30.231        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   4  norm          25.365        24.901        .79540E-04   -1.4700    
   5  norm          .10000E-03    6.9863        .14170E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     .10000E-03    10.436        .17321E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   7  Prefactor     .10000E-03    2.9669        .92358E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     .10000E-03    200.96        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     .10000E-03    20.078        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    6.0589        .13184E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          5.6539        8.2052        .84469E-03   -1.5232    
  12  norm          .10000E-03    4.1638        .10937E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .10000E-03    7.4976        .14679E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     .10000E-03    8.7486        .15703E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     .10000E-03    4.7996        .23167E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     .10000E-03    19.008        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     29.986        86.278        .73139E-04   -1.4612    
  18  Prefactor     .10000E-03    3.7819        .10406E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          .10000E-03    .65634        .71199E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .10000E-03    .39703        .60901E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     4.1317        4.0860        .10514E-03   -1.5301    
  22  Prefactor     5.7003        5.6402        .12435E-03   -1.5230    
  23  Prefactor     25.668        16.645        .79077E-04   -1.4694    
  24  Prefactor     .10000E-03    9.8798        .24000E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Prefactor     8.9384        27.773        .13403E-03   -1.5110    
  26  Prefactor     .10000E-03    3.4350        .99364E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  27  Prefactor     64.002        70.739        .50157E-04   -1.4106    
  28  Prefactor     .10000E-03    2.9816        .92332E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  29  Prefactor     6.9452        10.488        .15236E-03   -1.5181    
  30  norm          .10000E-03    9.1913        .16176E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  31  Prefactor     50.057        34.071        .56674E-04   -1.4292    
  32  norm          2.3078        .74586        .25480E-04   -1.5404    
  33  norm          26.751        21.225        .77441E-04   -1.4673    
  34  Prefactor     1.2330        7.6685        .27250E-03   -1.5486    
  35  norm          7.7265        3.8965        .74259E-04   -1.5152    
  36  Prefactor     .10000E-03    42.312        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  37  Normalizat    .81499        .32518        .27953E-03   -.99515    
  38  Prefactor     .77577        .28435        .27957E-03   -1.0063    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.29828e-09
Minuit parameter uncertainties:
  1  0.00019739
  2  7.31077e-07
  3  2.89997e-06
  4  24.9107
  5  3.15275e-06
  6  1.15751e-06
  7  9.89634e-08
  8  4.53857e-05
  9  3.18e-07
  10  3.38259e-06
  11  8.20682
  12  1.4222e-05
  13  1.07511e-07
  14  1.55304e-05
  15  3.31905e-05
  16  0.000110178
  17  86.6398
  18  1.97509e-06
  19  1.73025e-05
  20  2.16813e-06
  21  4.08624
  22  5.64076
  23  16.6478
  24  0.000355857
  25  27.8133
  26  1.33457e-06
  27  70.8321
  28  3.86336e-06
  29  10.4909
  30  4.53349e-06
  31  34.0839
  32  0.745861
  33  21.2305
  34  6.15087
  35  3.89658
  36  3.99837e-06
  37  0.325963
  38  0.284886
Done.

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

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.000e-04  1.102e-04  1.000e-04  1.000e+04 ( 1.000e-13)
354        Index:  2.565e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
716    Prefactor:  7.758e-01  2.849e-01  0.000e+00  1.000e+01 ( 1.000e+00)
717        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
718        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
715   Normalization:  8.150e-01  3.260e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 136.154 52.010
Photon Flux Upper Limit: 1.08e-07 ph cm-2 s-1
Energy Flux Upper Limit: 8.42e-03 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/987888/likelihoodResults_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.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) = 3014.40946343
delta logL = -0.000250194147611

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 3014.4092147
delta logL = -1.46557795233e-06

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
     2 'Index     '    2.9009       1.0000          .0000       10.000    
     3 'Normalizat'    .81499       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .77578       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7190E+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=   3014.409     FROM MIGRAD    STATUS=CONVERGED     91 CALLS      283 TOTAL
                     EDM=   .56E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10494E-03    9.8331        .18142E-01** at limit **
   2  Index         2.7959        5.0420        .50000        .23545E-04
   3  Normalizat    .81500        .52860E-02    .27953E-03   -.18338E-03
   4  Prefactor     .77577        .52019E-02    .27958E-03   -.17964E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000104941
  Index      = 2.79586
  Normalizat = 0.814996
  Prefactor  = 0.775769
 **********
 **   18 **HESSE 
 **********

 FCN=   3014.409     FROM HESSE     STATUS=NOT POSDEF    29 CALLS      312 TOTAL
                     EDM=   .50E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10494E-03    94.782        .20132E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Index         2.7959        5.2125        .50000       -.45652    
   3  Normalizat    .81500        .16424E-01    .11181E-04   -.99515    
   4  Prefactor     .77577        .16163E-01    .55915E-04   -1.0063    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.00807e-09
Minuit parameter uncertainties:
  1  0.0433508
  2  292.405
  3  0.0164241
  4  0.0161626
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/987888': 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) = 3014.40921428
delta logL = -1.0433254829e-06

Extracting fit parameters...

4FGL J0904.6+5200
   Spectrum: PowerLaw
353    Prefactor:  1.049e-04  4.335e-02  1.000e-04  1.000e+04 ( 1.000e-13)
354        Index:  2.796e+00  2.924e+02  0.000e+00  1.000e+01 (-1.000e+00)
355        Scale:  8.643e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
716    Prefactor:  7.758e-01  1.616e-02  0.000e+00  1.000e+01 ( 1.000e+00)
717        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
718        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
715   Normalization:  8.150e-01  1.642e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 136.154 52.010

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/987888/cmap_HighResolution_617241601_617500801_4FGL_J0904.6+5200_daily_bin1458.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='8.42e-03', job_status='DONE', photon_flux_upper_limit='1.08e-07', time_completed='2021-08-30 23:55:51.884249', job_id='987888', GAL2='0.78', fit_tolerance='1e-08', EG2='0.81', EG='0.81', time_epoch_completed='1630392951.88', return_code2='102', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.78', dlogl='-1.04e-06', ts2='-0.00', photon_index_error='0.00', photon_index='2.56' WHERE bin_id='1458' AND source_name='4FGL J0904.6+5200' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Mon Aug 30 23:55:51 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0078>
Subject: Job 987888: <4FGL_J0904.6+5200_daily_bin1458> in cluster <slac> Done

Job <4FGL_J0904.6+5200_daily_bin1458> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Mon Aug 30 23:40:18 2021
Job was executed on host(s) <bullet0078>, in queue <medium>, as user <kocevski> in cluster <slac> at Mon Aug 30 23:40:20 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Mon Aug 30 23:40:20 2021
Terminated at Mon Aug 30 23:55:54 2021
Results reported at Mon Aug 30 23:55:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0904.6+5200_daily_bin1458 136.154 52.0096 617241601 617500801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0904.6+5200 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   907.00 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             311.61 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   932 sec.
    Turnaround time :                            936 sec.

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

