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


Performing analysis on: 4FGL_J0510.0+1800_weekly_bin707
RA = 77.5181, Dec = 18.0135
tmin = 666576001, tmax = 667180801
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='903383', job_status='RUN', time_executed='2022-02-22 03:58:36.515140', time_epoch_executed='1645531116.52' WHERE source_name='4FGL J0510.0+1800' and cadence='weekly' and bin_id='707'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/903383

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/903383/ft1_4FGL_J0510.0+1800_weekly_bin707.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/903383/ft1_4FGL_J0510.0+1800_weekly_bin707.fits outfile=/scratch/kocevski/903383/ft1_filteredMKT_4FGL_J0510.0+1800_weekly_bin707.fits ra=77.5181 dec=18.0135 rad=12.0 tmin=666576001.0 tmax=667180801.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 6.62
user 6.28
sys 0.29

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.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/903383/ft1_filteredMKT_4FGL_J0510.0+1800_weekly_bin707.fits evtable="EVENTS" outfile="/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.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.58
user 0.40
sys 0.15

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits" evtable="EVENTS" scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits sctable="SC_DATA" outfile=/scratch/kocevski/903383/ltcube_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.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/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits
.....................!
real 36.84
user 36.27
sys 0.35

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits sctable="SC_DATA" expcube=/scratch/kocevski/903383/ltcube_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits outfile=/scratch/kocevski/903383/expmap_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.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/903383/ltcube_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits
.....................!
real 193.45
user 187.03
sys 4.96

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_archive_v18/Templates/S147.fits is the correct path to the extended template.
Extended source IC 443 in ROI with RadialGaussian spatial model.
Added 159 point sources and 2 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 J0510.0+1800 @ 77.5181 18.0135

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits outfile=/scratch/kocevski/903383/cmap_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.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=77.5181 yref=18.0135 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 1.03
user 0.43
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits outfile=/scratch/kocevski/903383/cmap_HighResolution_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.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=77.5181 yref=18.0135 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.61
user 0.47
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits evtable="EVENTS" scfile=/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/903383/Model_4FGL_J0510.0+1800_weekly_bin707.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 S 147
Working on...
/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits.....................!
real 1363.71
user 1359.69
sys 1.29

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits', '/scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits', expMap='/scratch/kocevski/903383/expmap_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits', expCube='/scratch/kocevski/903383/ltcube_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/903383/Model_4FGL_J0510.0+1800_weekly_bin707.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0510.0+1800'

4FGL J0510.0+1800
   Spectrum: LogParabola
240         norm:  5.353e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-12)
241        alpha:  2.085e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
242         beta:  9.246e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
243           Eb:  9.966e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/903383/ft1_filtered_4FGL_J0510.0+1800_weekly_bin707.fits
Spacecraft file(s): /scratch/kocevski/903383/ft2_4FGL_J0510.0+1800_weekly_bin707.fits
Exposure map: /scratch/kocevski/903383/expmap_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits
Exposure cube: /scratch/kocevski/903383/ltcube_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/903383/Model_4FGL_J0510.0+1800_weekly_bin707.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) = 63194.8986395

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    .15794E-02   1.0000         .10000E-03   10000.    
     3 'norm      '    1.6479       1.0000         .10000E-03   10000.    
     4 'norm      '    12.710       1.0000         .10000E-03   10000.    
     5 'norm      '    .10004E-03   1.0000         .10000E-03   10000.    
     6 'Prefactor '    7.8486       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10617E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    1.1211       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10141E-03   1.0000         .10000E-03   10000.    
    10 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    .28152E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    13 'Prefactor '    47.073       1.0000         .10000E-03   10000.    
    14 'norm      '    5.4268       1.0000         .10000E-03   10000.    
    15 'Prefactor '    .10002E-03   1.0000         .10000E-03   10000.    
    16 'norm      '    2.3636       1.0000         .10000E-03   10000.    
    17 'norm      '    .44525       1.0000         .10000E-03   10000.    
    18 'Prefactor '    1.3145       1.0000         .10000E-03   10000.    
    19 'norm      '    1.9468       1.0000         .10000E-03   10000.    
    20 'Prefactor '    2.7242       1.0000         .10000E-03   10000.    
    21 'Prefactor '    22.411       1.0000         .10000E-03   10000.    
    22 'Prefactor '    .13162E-03   1.0000         .10000E-03   10000.    
    23 'Prefactor '    .10007E-03   1.0000         .10000E-03   10000.    
    24 'Prefactor '    .12415E-03   1.0000         .10000E-03   10000.    
    25 'Normalizat'    1.3545       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .94938       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5490E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   63194.84     FROM MIGRAD    STATUS=CONVERGED    654 CALLS     3345 TOTAL
                     EDM=   .17E-08  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    7.6099       -.31549E-05** at limit **
   2  Prefactor     .10002E-03    1.7480       -.10421E-06** at limit **
   3  norm          1.6480        1.1425       -.16935E-06   -.62941E-03
   4  norm          12.707        19.204        .48136E-07   -.16278E-04
   5  norm          .10000E-03    5.9911        .28037E-05** at limit **
   6  Prefactor     7.8558        14.243       -.14294E-05   -.21577E-03
   7  Prefactor     .10000E-03    47.771        .31186E-04** at limit **
   8  Prefactor     1.1208        1.4779       -.32155E-06   -.35321E-02
   9  Prefactor     .10000E-03    .46244       -.12480E-06** at limit **
  10  norm          .10000E-03    .64957        .37721E-07** at limit **
  11  Prefactor     .10000E-03    .52682        .95482E-06** at limit **
  12  Prefactor     .10000E-03    8.1275        .14863E-05** at limit **
  13  Prefactor     47.017        31.519       -.23322E-04   -.23412E-03
  14  norm          5.4268        1.5579        .12273E-07   -.10515E-02
  15  Prefactor     .10000E-03    5.4390       -.17981E-05** at limit **
  16  norm          2.3652        3.1108        .60527E-06   -.22245E-02
  17  norm          .44558        .50886        .35440E-06    .17664E-02
  18  Prefactor     1.3145        .86110E-01   -.36004E-08   -.15830E-02
  19  norm          1.9469        1.8777        .29516E-08   -.33051E-03
  20  Prefactor     2.7243        .56821        .12742E-07   -.11115E-02
  21  Prefactor     22.406        12.916       -.63839E-05    .69791E-03
  22  Prefactor     .10009E-03    46.026       -.19849E-04** at limit **
  23  Prefactor     .10000E-03    4.6130        .23242E-06** at limit **
  24  Prefactor     .10000E-03    .47075        .22555E-06** at limit **
  25  Normalizat    1.3544        .18514        .35056E-05   -.31172E-03
  26  Prefactor     .94938        .26884E-01   -.22472E-07   -.93236E-03
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.0001
  Prefactor  = 0.000100019
  norm       = 1.64798
  norm       = 12.7074
  norm       = 0.0001
  Prefactor  = 7.85576
  Prefactor  = 0.000100003
  Prefactor  = 1.12083
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.000100001
  Prefactor  = 0.0001
  Prefactor  = 47.0172
  norm       = 5.42681
  Prefactor  = 0.0001
  norm       = 2.36522
  norm       = 0.44558
  Prefactor  = 1.3145
  norm       = 1.94692
  Prefactor  = 2.72426
  Prefactor  = 22.4064
  Prefactor  = 0.000100089
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  Normalizat = 1.35443
  Prefactor  = 0.94938
 **********
 **   18 **HESSE 
 **********

 FCN=   63194.84     FROM HESSE     STATUS=OK           474 CALLS     3819 TOTAL
                     EDM=   .21E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    7.6274        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     .10002E-03    11.523        .63473E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  norm          1.6480        1.1309        .20874E-03   -1.5451    
   4  norm          12.707        19.209        .11236E-03   -1.4995    
   5  norm          .10000E-03    6.0261        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  Prefactor     7.8558        14.251        .14313E-03   -1.5147    
   7  Prefactor     .10000E-03    48.878        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     1.1208        3.7302        .22172E-02   -1.5496    
   9  Prefactor     .10000E-03    1.5777        .32580E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  norm          .10000E-03    .66027        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .10000E-03    .52430        .70081E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    8.1544        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     47.017        32.032        .58442E-04   -1.4336    
  14  norm          5.4268        1.5599        .81450E-03   -1.5242    
  15  Prefactor     .10000E-03    5.4964        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  norm          2.3652        3.3042        .13327E-02   -1.5400    
  17  norm          .44558        .56256        .18172E-02   -1.5574    
  18  Prefactor     1.3145        .92001E-01    .12376E-04   -1.5479    
  19  norm          1.9469        1.9401        .27843E-03   -1.5429    
  20  Prefactor     2.7243        .59386        .63367E-04   -1.5378    
  21  Prefactor     22.406        12.510        .84611E-04   -1.4761    
  22  Prefactor     .10009E-03    45.504        .36285E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  23  Prefactor     .10000E-03    4.6260        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  24  Prefactor     .10000E-03    2.4194        .32831E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  25  Normalizat    1.3544        .19008        .76338E-03   -.81956    
  26  Prefactor     .94938        .28640E-01    .14076E-03   -.94436    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.13641e-08
Minuit parameter uncertainties:
  1  9.82687e-06
  2  0.000927246
  3  1.13088
  4  19.2179
  5  1.41374e-05
  6  14.2573
  7  0.00077164
  8  3.73096
  9  7.07013e-07
  10  4.76193e-06
  11  5.26081e-05
  12  1.55364e-05
  13  32.0435
  14  1.55995
  15  1.12177e-06
  16  3.30441
  17  0.562562
  18  0.0920009
  19  1.94012
  20  0.593863
  21  12.5113
  22  0.00403067
  23  3.52311e-06
  24  3.88361e-05
  25  0.190174
  26  0.0286404
Done.

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

Extracting fit parameters...

4FGL J0510.0+1800
   Spectrum: LogParabola
240         norm:  1.000e-04  4.762e-06  1.000e-04  1.000e+04 ( 1.000e-12)
241        alpha:  2.085e+00  0.000e+00  0.000e+00  5.000e+00 ( 1.000e+00) fixed
242         beta:  9.246e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
243           Eb:  9.966e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
538    Prefactor:  9.494e-01  2.864e-02  0.000e+00  1.000e+01 ( 1.000e+00)
539        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
540        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
537   Normalization:  1.354e+00  1.902e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): -0.00
Ra Dec: 77.518 18.014
Photon Flux Upper Limit: 2.60e-08 ph cm-2 s-1
Energy Flux Upper Limit: 1.35e-05 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/903383/likelihoodResults_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.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) = 63194.8386736
delta logL = 9.09472146304e-06

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 63194.838672
delta logL = 1.07685409603e-05

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     2 'alpha     '    3.4415       1.0000          .0000       5.0000    
     3 'Normalizat'    1.3544       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .94938       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5490E+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=   63194.68     FROM MIGRAD    STATUS=CONVERGED    255 CALLS      462 TOTAL
                     EDM=   .29E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .15845E-01    .28923E-01    .35294E-03   -.73167E-02
   2  alpha         5.0000        3.5051        .50000    ** at limit **
   3  Normalizat    1.3244        .18550        .77066E-03    .27143E-05
   4  Prefactor     .95181        .28402E-01    .14059E-03   -.10739E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.015845
  alpha      = 5
  Normalizat = 1.32438
  Prefactor  = 0.951813
 **********
 **   18 **HESSE 
 **********

 FCN=   63194.68     FROM HESSE     STATUS=OK            31 CALLS      493 TOTAL
                     EDM=   .81E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .15845E-01    .29583E-01    .14117E-04   -1.5733    
   2  alpha         5.0000        3.5309        .50000        1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   3  Normalizat    1.3244        .18517        .30827E-04   -.82842    
   4  Prefactor     .95181        .28390E-01    .56234E-05   -.94353    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.06058e-12
Minuit parameter uncertainties:
  1  0.0295827
  2  1.33771e-05
  3  0.185262
  4  0.0283907
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/903383': 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) = 63194.6812242
delta logL = 0.157458528112

Extracting fit parameters...

4FGL J0510.0+1800
   Spectrum: LogParabola
240         norm:  1.584e-02  2.958e-02  1.000e-04  1.000e+04 ( 1.000e-12)
241        alpha:  5.000e+00  1.338e-05  0.000e+00  5.000e+00 ( 1.000e+00)
242         beta:  9.246e-02  0.000e+00  0.000e+00  1.000e+01 ( 1.000e+00) fixed
243           Eb:  9.966e+02  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
538    Prefactor:  9.518e-01  2.839e-02  0.000e+00  1.000e+01 ( 1.000e+00)
539        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
540        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
537   Normalization:  1.324e+00  1.853e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): -0.00
Ra Dec: 77.518 18.014

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/903383/cmap_HighResolution_666576001_667180801_4FGL_J0510.0+1800_weekly_bin707.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.35e-05', job_status='DONE', photon_flux_upper_limit='2.60e-08', time_completed='2022-02-22 05:39:37.298786', job_id='903383', GAL2='0.95', fit_tolerance='1e-08', EG2='1.32', EG='1.35', time_epoch_completed='1645537177.3', return_code2='0', ts='-0.00', comment='SUCCESS', return_code='0', GAL='0.95', dlogl='1.57e-01', ts2='0.34', photon_index_error='0.00', photon_index='2.08' WHERE bin_id='707' AND source_name='4FGL J0510.0+1800' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Feb 22 05:39:37 PST 2022

ter <slac> at Tue Feb 22 00:06:57 2022
Job was executed on host(s) <bullet0259>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Feb 22 00:10:09 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Feb 22 00:10:09 2022
Terminated at Tue Feb 22 01:53:08 2022
Results reported at Tue Feb 22 01:53:08 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0510.0+1800_weekly_bin707 77.5181 18.0135 666576001 667180801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0510.0+1800 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   6048.00 sec.
    Max Memory :                                 628 MB
    Average Memory :                             423.86 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   6179 sec.
    Turnaround time :                            6371 sec.

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


------------------------------------------------------------
Sender: LSF System <lsf@bullet0070>
Subject: Job 903383: <4FGL_J0510.0+1800_weekly_bin707> in cluster <slac> Done

Job <4FGL_J0510.0+1800_weekly_bin707> was submitted from host <rhel6-64j> by user <kocevski> in cluster <slac> at Tue Feb 22 00:06:54 2022
Job was executed on host(s) <bullet0070>, in queue <medium>, as user <kocevski> in cluster <slac> at Tue Feb 22 00:09:51 2022
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Tue Feb 22 00:09:51 2022
Terminated at Tue Feb 22 05:39:38 2022
Results reported at Tue Feb 22 05:39:38 2022

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J0510.0+1800_weekly_bin707 77.5181 18.0135 666576001 667180801 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J0510.0+1800 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   6060.00 sec.
    Max Memory :                                 628 MB
    Average Memory :                             163.66 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   19786 sec.
    Turnaround time :                            19964 sec.

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

