/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 7 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 = 7567
number of fields = 27
No RA_SUN column yet. Adding RA_SUN/DEC_SUN columns.
Done.


Performing analysis on: 4FGL_J1738.3+3228_daily_bin179
RA = 264.584, Dec = 32.4823
tmin = 285724801, tmax = 285984001
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='951530', job_status='RUN', time_executed='2021-09-18 01:20:32.807216', time_epoch_executed='1631953232.81' WHERE source_name='4FGL J1738.3+3228' and cadence='daily' and bin_id='179'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/951530

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

Retrieving the FT1 file...

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

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

Retrieving 48 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/951530/ft1_4FGL_J1738.3+3228_daily_bin179.fits


Retrieving the FT1 file...

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

Retrieving 48 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/951530/ft1_4FGL_J1738.3+3228_daily_bin179.fits outfile=/scratch/kocevski/951530/ft1_filteredMKT_4FGL_J1738.3+3228_daily_bin179.fits ra=264.584 dec=32.4823 rad=12.0 tmin=285724801.0 tmax=285984001.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 4.18
user 3.93
sys 0.21

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.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/951530/ft1_filteredMKT_4FGL_J1738.3+3228_daily_bin179.fits evtable="EVENTS" outfile="/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.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.32
sys 0.17

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits" evtable="EVENTS" scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits sctable="SC_DATA" outfile=/scratch/kocevski/951530/ltcube_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.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/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits
.....................!
real 12.31
user 11.95
sys 0.32

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits evtable="EVENTS" scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits sctable="SC_DATA" expcube=/scratch/kocevski/951530/ltcube_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits outfile=/scratch/kocevski/951530/expmap_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.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/951530/ltcube_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits
.....................!
real 191.20
user 185.76
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
Added 205 point sources and 0 extended sources

Setting source of interest to:
4FGL J1738.3+3228 @ 264.584 32.4823

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits outfile=/scratch/kocevski/951530/cmap_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.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=264.584 yref=32.4823 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.54
user 0.37
sys 0.15

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits outfile=/scratch/kocevski/951530/cmap_HighResolution_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.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=264.584 yref=32.4823 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.54
user 0.38
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits evtable="EVENTS" scfile=/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/951530/Model_4FGL_J1738.3+3228_daily_bin179.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/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits.....................!
real 61.62
user 60.22
sys 1.22

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits', '/scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits', expMap='/scratch/kocevski/951530/expmap_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits', expCube='/scratch/kocevski/951530/ltcube_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/951530/Model_4FGL_J1738.3+3228_daily_bin179.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1738.3+3228'

4FGL J1738.3+3228
   Spectrum: PowerLaw
322    Prefactor:  7.549e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
323        Index:  2.454e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
324        Scale:  1.347e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/951530/ft1_filtered_4FGL_J1738.3+3228_daily_bin179.fits
Spacecraft file(s): /scratch/kocevski/951530/ft2_4FGL_J1738.3+3228_daily_bin179.fits
Exposure map: /scratch/kocevski/951530/expmap_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits
Exposure cube: /scratch/kocevski/951530/ltcube_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/951530/Model_4FGL_J1738.3+3228_daily_bin179.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) = 7423.4305958

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

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 'Prefactor '    27.097       1.0000         .10000E-03   10000.    
     3 'norm      '    3.5339       1.0000         .10000E-03   10000.    
     4 'Prefactor '    8.4372       1.0000         .10000E-03   10000.    
     5 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
     6 'norm      '    81.339       1.0000         .10000E-03   10000.    
     7 'Prefactor '    110.93       1.0000         .10000E-03   10000.    
     8 'Prefactor '    166.07       1.0000         .10000E-03   10000.    
     9 'Prefactor '    11.384       1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10033E-03   1.0000         .10000E-03   10000.    
    11 'Prefactor '    7.6871       1.0000         .10000E-03   10000.    
    12 'Prefactor '    25.541       1.0000         .10000E-03   10000.    
    13 'Prefactor '    11.821       1.0000         .10000E-03   10000.    
    14 'Prefactor '    10.937       1.0000         .10000E-03   10000.    
    15 'norm      '    .80588E-01   1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'Prefactor '    4.9997       1.0000         .10000E-03   10000.    
    18 'norm      '    .10002E-03   1.0000         .10000E-03   10000.    
    19 'Prefactor '    2.8184       1.0000         .10000E-03   10000.    
    20 'Prefactor '    .10034E-03   1.0000         .10000E-03   10000.    
    21 'norm      '    .10028E-03   1.0000         .10000E-03   10000.    
    22 'Normalizat'    .62859       1.0000         .10000E-01   10.000    
    23 'Prefactor '    .98864       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6690E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   7423.416     FROM MIGRAD    STATUS=CONVERGED    485 CALLS     2576 TOTAL
                     EDM=   .28E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=   .6%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm          .10000E-03    .59581        .37531E-07** at limit **
   2  Prefactor     27.095        31.471        .25535E-06   -.45674E-05
   3  norm          3.5338        5.5778        .57091E-05    .11528E-03
   4  Prefactor     8.4373        48.981       -.84340E-06   -.76160E-05
   5  norm          .10000E-03    2.8248        .11687E-06** at limit **
   6  norm          81.337        80.031        .67745E-08   -.19532E-05
   7  Prefactor     110.94        73.216       -.85533E-06   -.78592E-05
   8  Prefactor     166.02        107.21        .10669E-06   -.78084E-04
   9  Prefactor     11.383        11.964        .61403E-07   -.32787E-04
  10  Prefactor     .10000E-03    44.437       -.76029E-06** at limit **
  11  Prefactor     7.6870        7.0078        .49856E-07   -.29359E-05
  12  Prefactor     25.593        39.511       -.22533E-05    .22174E-04
  13  Prefactor     11.697        125.30        .40348E-05   -.69827E-04
  14  Prefactor     10.936        9.9241        .77822E-07   -.91070E-06
  15  norm          .78945E-01    .97325        .45388E-06   -.68975E-03
  16  norm          .10000E-03    29.516        .13145E-06** at limit **
  17  Prefactor     4.9985        6.2624        .36396E-06   -.47579E-04
  18  norm          .10000E-03    2.2288       -.10785E-07** at limit **
  19  Prefactor     2.8180        5.0341        .43821E-06    .43199E-04
  20  Prefactor     .10000E-03    27.788        .18412E-06** at limit **
  21  norm          .10000E-03    29.163        .37220E-06** at limit **
  22  Normalizat    .62849        .20189       -.32060E-05   -.40689E-04
  23  Prefactor     .98872        .10177        .59253E-06   -.24474E-03
                               ERR DEF=  .500    
Final values: 
  norm       = 0.0001
  Prefactor  = 27.0952
  norm       = 3.53384
  Prefactor  = 8.43733
  norm       = 0.0001
  norm       = 81.3369
  Prefactor  = 110.939
  Prefactor  = 166.021
  Prefactor  = 11.3832
  Prefactor  = 0.0001
  Prefactor  = 7.68695
  Prefactor  = 25.5925
  Prefactor  = 11.6971
  Prefactor  = 10.9364
  norm       = 0.0789448
  norm       = 0.0001
  Prefactor  = 4.9985
  norm       = 0.0001
  Prefactor  = 2.81801
  Prefactor  = 0.0001
  norm       = 0.0001
  Normalizat = 0.628492
  Prefactor  = 0.988719
 **********
 **   18 **HESSE 
 **********

 FCN=   7423.416     FROM HESSE     STATUS=OK           370 CALLS     2946 TOTAL
                     EDM=   .56E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm          .10000E-03    .61316        .12986E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     27.095        31.471        .76960E-04   -1.4666    
   3  norm          3.5338        5.5854        .10752E-02   -1.5332    
   4  Prefactor     8.4373        48.836        .13801E-03   -1.5127    
   5  norm          .10000E-03    2.8433        .14111E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          81.337        80.044        .44534E-04   -1.3902    
   7  Prefactor     110.94        73.357        .38191E-04   -1.3597    
   8  Prefactor     166.02        107.14        .15650E-03   -1.3124    
   9  Prefactor     11.383        11.952        .11874E-03   -1.5033    
  10  Prefactor     .10000E-03    44.558        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     7.6870        7.0073        .14463E-03   -1.5153    
  12  Prefactor     25.593        38.828        .79265E-04   -1.4696    
  13  Prefactor     11.697        121.74        .11652E-03   -1.5024    
  14  Prefactor     10.936        9.9474        .12114E-03   -1.5046    
  15  norm          .78945E-01    2.9627        .16340E-02   -1.5652    
  16  norm          .10000E-03    29.544        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     4.9985        6.2457        .17985E-03   -1.5261    
  18  norm          .10000E-03    2.2307        .12562E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  Prefactor     2.8180        5.0107        .24227E-03   -1.5372    
  20  Prefactor     .10000E-03    28.091        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  norm          .10000E-03    29.432        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Normalizat    .62849        .22812        .37316E-03   -1.0679    
  23  Prefactor     .98872        .11740        .16044E-03   -.93107    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 5.56136e-10
Minuit parameter uncertainties:
  1  6.72726e-07
  2  31.4902
  3  5.58627
  4  40.6478
  5  5.2776e-06
  6  80.1498
  7  73.4172
  8  107.261
  9  11.9541
  10  1.32351e-05
  11  7.00805
  12  38.8662
  13  75.6716
  14  9.94891
  15  0.966676
  16  8.42381e-05
  17  6.24656
  18  1.0485e-07
  19  5.0114
  20  0.000107555
  21  6.7269e-05
  22  0.228459
  23  0.117431
Done.

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

Extracting fit parameters...

4FGL J1738.3+3228
   Spectrum: PowerLaw
322    Prefactor:  1.660e+02  1.073e+02  1.000e-04  1.000e+04 ( 1.000e-14)
323        Index:  2.454e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
324        Scale:  1.347e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  9.887e-01  1.174e-01  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  6.285e-01  2.285e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 3.76
Ra Dec: 264.584 32.482
Photon Index (Fixed Index): 2.45 +/- 0.00
Photon Flux (Fixed Index): 6.75e-08 +/- 4.36e-08
Energy Flux (Fixed Index): 2.07e-05 +/- 1.34e-05

TS (Fixed Index): 3.76
Ra Dec: 264.584 32.482
Photon Flux Upper Limit: 1.53e-07 ph cm-2 s-1
Energy Flux Upper Limit: 1.19e-02 MeV cm-2 s-1

Saving results to:
/scratch/kocevski/951530/likelihoodResults_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.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) = 7422.32545039
delta logL = 1.0905977452

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 102
logL (Free Index) = 7422.29683836
delta logL = 1.11920977673

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    34.882       1.0000         .10000E-03   10000.    
     2 'Index     '    3.4922       1.0000          .0000       10.000    
     3 'Normalizat'    .55077       1.0000         .10000E-01   10.000    
     4 'Prefactor '    1.0144       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6690E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   7422.297     FROM MIGRAD    STATUS=CONVERGED     63 CALLS      267 TOTAL
                     EDM=   .11E-07    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     34.714        263.00        .16963E-02    .28390E-04
   2  Index         3.4945        2.2360        .87240E-01    .23185E-03
   3  Normalizat    .55075        .83411E-01    .89587E-01    .37335E-04
   4  Prefactor     1.0144        .39958E-01    .42747E-01   -.48105E-05
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 34.714
  Index      = 3.49447
  Normalizat = 0.550745
  Prefactor  = 1.01444
 **********
 **   18 **HESSE 
 **********

 FCN=   7422.297     FROM HESSE     STATUS=NOT POSDEF    33 CALLS      300 TOTAL
                     EDM=   .59E-09    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE     INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     34.714        371.88        .67852E-04   -1.4529    
   2  Index         3.4945        2.9284        .34323E-02   -.30585    
   3  Normalizat    .55075        .24055        .39686E-03   -1.1012    
   4  Prefactor     1.0144        .12306        .15853E-03   -.92250    
                               ERR DEF=  .500    
Minuit fit quality: 2   estimated distance: 5.89672e-10
Minuit parameter uncertainties:
  1  229.082
  2  3.15325
  3  0.241005
  4  0.123093
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/951530': 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) = 7422.29683444
delta logL = 1.11921369704

Extracting fit parameters...

4FGL J1738.3+3228
   Spectrum: PowerLaw
322    Prefactor:  3.471e+01  2.291e+02  1.000e-04  1.000e+04 ( 1.000e-14)
323        Index:  3.494e+00  3.153e+00  0.000e+00  1.000e+01 (-1.000e+00)
324        Scale:  1.347e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
666    Prefactor:  1.014e+00  1.231e-01  0.000e+00  1.000e+01 ( 1.000e+00)
667        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
668        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
665   Normalization:  5.507e-01  2.410e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 6.32
Ra Dec: 264.584 32.482
Photon Index (Free Index): 3.49 +/- 3.15
Photon Flux (Free Index): 1.23e-07 +/- 7.45e-08
Energy Flux (Free Index): 2.06e-05 +/- 1.42e-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/951530/cmap_HighResolution_285724801_285984001_4FGL_J1738.3+3228_daily_bin179.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='1.19e-02', comment='SUCCESS', photon_flux='6.75e-08', energy_flux2='2.06e-05', photon_flux_error='4.36e-08', dlogl='1.12e+00', energy_flux='2.07e-05', photon_flux2='1.23e-07', job_status='DONE', time_completed='2021-09-18 01:34:48.112685', photon_index_error2='3.15', photon_index2='3.49', ts='3.76', fit_tolerance='1e-08', GAL='0.99', photon_index_error='0.00', photon_flux_upper_limit='1.53e-07', energy_flux_error2='1.42e-05', EG='0.63', time_epoch_completed='1631954088.11', return_code='0', job_id='951530', GAL2='1.01', EG2='0.55', return_code2='102', energy_flux_error='1.34e-05', photon_flux_error2='7.45e-08', ts2='6.32', photon_index='2.45' WHERE bin_id='179' AND source_name='4FGL J1738.3+3228' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Sat Sep 18 01:34:48 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0036>
Subject: Job 951530: <4FGL_J1738.3+3228_daily_bin179> in cluster <slac> Done

Job <4FGL_J1738.3+3228_daily_bin179> was submitted from host <rhel6-64k> by user <kocevski> in cluster <slac> at Sat Sep 18 01:20:16 2021
Job was executed on host(s) <bullet0036>, in queue <medium>, as user <kocevski> in cluster <slac> at Sat Sep 18 01:20:17 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Sat Sep 18 01:20:17 2021
Terminated at Sat Sep 18 01:34:48 2021
Results reported at Sat Sep 18 01:34:48 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1738.3+3228_daily_bin179 264.584 32.4823 285724801 285984001 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1738.3+3228 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   821.24 sec.
    Max Memory :                                 1258 MB
    Average Memory :                             339.56 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   871 sec.
    Turnaround time :                            872 sec.

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

