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


Performing analysis on: 4FGL_J1704.2+1234_daily_bin1580
RA = 256.06, Dec = 12.5752
tmin = 648864001, tmax = 649123201
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='373648', job_status='RUN', time_executed='2021-09-16 14:42:58.255525', time_epoch_executed='1631828578.26' WHERE source_name='4FGL J1704.2+1234' and cadence='daily' and bin_id='1580'

Database successfully updated.
Done.

Creating custom output directory:
/scratch/kocevski/373648

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

Retrieving the FT1 file...

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

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

Retrieving 46 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/scratch/kocevski/373648/ft1_4FGL_J1704.2+1234_daily_bin1580.fits


Retrieving the FT1 file...

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

Retrieving 46 files...
Done.


Merging files...

Merged file saved to:
/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits


Selecting the photons:
time -p gtselect infile=/scratch/kocevski/373648/ft1_4FGL_J1704.2+1234_daily_bin1580.fits outfile=/scratch/kocevski/373648/ft1_filteredMKT_4FGL_J1704.2+1234_daily_bin1580.fits ra=256.06 dec=12.5752 rad=12.0 tmin=648864001.0 tmax=649123201.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.02
user 2.80
sys 0.19

Adding sun position to ft2 file:
/nfs/farm/g/glast/g/LCRepository/Repository/bin/sunpos /scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits

Selecting the good time intervals:
time -p gtmktime scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.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/373648/ft1_filteredMKT_4FGL_J1704.2+1234_daily_bin1580.fits evtable="EVENTS" outfile="/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.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.51
user 0.33
sys 0.16

Generating the livetime cube:
time -p gtltcube evfile="/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits" evtable="EVENTS" scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits sctable="SC_DATA" outfile=/scratch/kocevski/373648/ltcube_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.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/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits
.....................!
real 14.88
user 14.45
sys 0.38

Generating the exposure map:
time -p gtexpmap evfile=/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits evtable="EVENTS" scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits sctable="SC_DATA" expcube=/scratch/kocevski/373648/ltcube_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits outfile=/scratch/kocevski/373648/expmap_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.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/373648/ltcube_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits
.....................!
real 191.39
user 185.77
sys 5.01

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 FHES J1723.5-0501 in ROI with RadialGaussian spatial model.
Added 179 point sources and 1 extended sources
If using unbinned likelihood you will need to rerun gtdiffrsp for the extended sources or rerun the makeModel function with optional argument psForce=True

Setting source of interest to:
4FGL J1704.2+1234 @ 256.06 12.5752

Creating the counts map:
time -p gtbin evfile=/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits outfile=/scratch/kocevski/373648/cmap_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.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=256.06 yref=12.5752 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.55
user 0.37
sys 0.16

Creating the high resolution counts map:
time -p gtbin evfile=/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits outfile=/scratch/kocevski/373648/cmap_HighResolution_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.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=256.06 yref=12.5752 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.56
user 0.39
sys 0.15

Computing the diffuse response:
time -p gtdiffrsp evfile=/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits evtable="EVENTS" scfile=/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits sctable="SC_DATA" srcmdl=/scratch/kocevski/373648/Model_4FGL_J1704.2+1234_daily_bin1580.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 FHES J1723.5-0501
adding source GAL_V02
Working on...
/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits.....................!
real 86.82
user 85.38
sys 1.21

Creating the likelihood object...
obs = UnbinnedObs('/scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits', '/scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits', expMap='/scratch/kocevski/373648/expmap_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits', expCube='/scratch/kocevski/373648/ltcube_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/scratch/kocevski/373648/Model_4FGL_J1704.2+1234_daily_bin1580.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1704.2+1234'

4FGL J1704.2+1234
   Spectrum: PowerLaw
263    Prefactor:  7.833e+00  0.000e+00  1.000e-04  1.000e+04 ( 1.000e-14)
264        Index:  2.218e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
265        Scale:  2.055e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /scratch/kocevski/373648/ft1_filtered_4FGL_J1704.2+1234_daily_bin1580.fits
Spacecraft file(s): /scratch/kocevski/373648/ft2_4FGL_J1704.2+1234_daily_bin1580.fits
Exposure map: /scratch/kocevski/373648/expmap_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits
Exposure cube: /scratch/kocevski/373648/ltcube_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.fits
IRFs: P8R3_SOURCE_V2
Source model file: /scratch/kocevski/373648/Model_4FGL_J1704.2+1234_daily_bin1580.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) = 10984.4081315

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .10460E-03   1.0000         .10000E-03   10000.    
     2 'Prefactor '    23.058       1.0000         .10000E-03   10000.    
     3 'Prefactor '    2.8036       1.0000         .10000E-03   10000.    
     4 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
     5 'Prefactor '    1.0849       1.0000         .10000E-03   10000.    
     6 'Prefactor '    5.2109       1.0000         .10000E-03   10000.    
     7 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
     8 'Prefactor '    191.15       1.0000         .10000E-03   10000.    
     9 'Prefactor '    .10500E-03   1.0000         .10000E-03   10000.    
    10 'Prefactor '    .10004E-03   1.0000         .10000E-03   10000.    
    11 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    12 'Prefactor '    .10000E-03   1.0000         .10000E-03   10000.    
    13 'norm      '    9.6682       1.0000         .10000E-03   10000.    
    14 'Prefactor '    .10001E-03   1.0000         .10000E-03   10000.    
    15 'Prefactor '    5.5118       1.0000         .10000E-03   10000.    
    16 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    17 'norm      '    2.2485       1.0000         .10000E-03   10000.    
    18 'norm      '    .10000E-03   1.0000         .10000E-03   10000.    
    19 'norm      '    5.2410       1.0000         .10000E-03   10000.    
    20 'Normalizat'    1.1997       1.0000         .10000E-01   10.000    
    21 'Prefactor '    .85604       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6070E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   10984.40     FROM MIGRAD    STATUS=CONVERGED    424 CALLS     2173 TOTAL
                     EDM=   .89E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.5%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     .10000E-03    36.936       -.11072E-04** at limit **
   2  Prefactor     23.053        12.951        .22036E-06    .15912E-03
   3  Prefactor     2.8034        7.4860       -.86165E-06   -.76141E-04
   4  Prefactor     .10000E-03    1.7579       -.26919E-07** at limit **
   5  Prefactor     1.0848        3.9710       -.33543E-06   -.38744E-03
   6  Prefactor     5.2108        5.1404        .30961E-06   -.16358E-02
   7  Prefactor     .10000E-03    6.3039        .28303E-05** at limit **
   8  Prefactor     191.14        76.919       -.59571E-05   -.12771E-03
   9  Prefactor     .10000E-03    6.4211        .40223E-05** at limit **
  10  Prefactor     .10000E-03    4.7079        .19019E-06** at limit **
  11  norm          .10000E-03    .98099        .22248E-07** at limit **
  12  Prefactor     .10000E-03    5.9516       -.36015E-05** at limit **
  13  norm          9.6682        8.2295        .76254E-08    .23454E-04
  14  Prefactor     .10000E-03    35.142        .10013E-04** at limit **
  15  Prefactor     5.5120        3.5060       -.15080E-06   -.10187E-03
  16  norm          .10000E-03    7.0785       -.34388E-05** at limit **
  17  norm          2.2481        4.1378        .10040E-05   -.17523E-02
  18  norm          .10000E-03    17.195        .43179E-06** at limit **
  19  norm          5.2411        1.9150       -.17438E-07   -.70033E-05
  20  Normalizat    1.1996        .21882        .48133E-06    .11234E-04
  21  Prefactor     .85605        .75416E-01    .16713E-06    .16112E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0.000100001
  Prefactor  = 23.0532
  Prefactor  = 2.80339
  Prefactor  = 0.0001
  Prefactor  = 1.08477
  Prefactor  = 5.21076
  Prefactor  = 0.0001
  Prefactor  = 191.137
  Prefactor  = 0.0001
  Prefactor  = 0.0001
  norm       = 0.0001
  Prefactor  = 0.0001
  norm       = 9.6682
  Prefactor  = 0.0001
  Prefactor  = 5.51198
  norm       = 0.0001
  norm       = 2.24812
  norm       = 0.0001
  norm       = 5.24106
  Normalizat = 1.19962
  Prefactor  = 0.856047
 **********
 **   18 **HESSE 
 **********

 FCN=   10984.40     FROM HESSE     STATUS=OK           315 CALLS     2488 TOTAL
                     EDM=   .82E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     .10000E-03    37.098        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     23.053        12.880        .83417E-04   -1.4747    
   3  Prefactor     2.8034        7.4262        .24296E-03   -1.5373    
   4  Prefactor     .10000E-03    1.7731        .13565E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     1.0848        3.9725        .38680E-03   -1.5500    
   6  Prefactor     5.2108        5.5736        .88048E-03   -1.5251    
   7  Prefactor     .10000E-03    6.3081        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   8  Prefactor     191.14        77.371        .14606E-03   -1.2934    
   9  Prefactor     .10000E-03    6.5508        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .10000E-03    4.7235        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          .10000E-03    .99474        .10134E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  Prefactor     .10000E-03    5.9593        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          9.6682        8.2298        .12888E-03   -1.5086    
  14  Prefactor     .10000E-03    35.154        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  15  Prefactor     5.5120        3.5019        .14542E-03   -1.5238    
  16  norm          .10000E-03    7.1303        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  norm          2.2481        6.7962        .13702E-02   -1.5408    
  18  norm          .10000E-03    17.197        .18142E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  19  norm          5.2411        1.9174        .84574E-04   -1.5250    
  20  Normalizat    1.1996        .26012        .39858E-03   -.86615    
  21  Prefactor     .85605        .90966E-01    .16016E-03   -.97694    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 8.23925e-09
Minuit parameter uncertainties:
  1  0.000296529
  2  12.8814
  3  7.42863
  4  2.01612e-06
  5  3.97343
  6  5.57415
  7  2.93958e-05
  8  77.4125
  9  7.70151e-05
  10  5.65976e-06
  11  3.08367e-07
  12  3.4176e-05
  13  8.23074
  14  0.000264858
  15  3.50202
  16  3.8192e-05
  17  6.79858
  18  6.95704e-06
  19  1.91744
  20  0.260397
  21  0.0909823
Done.

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

Extracting fit parameters...

4FGL J1704.2+1234
   Spectrum: PowerLaw
263    Prefactor:  1.911e+02  7.741e+01  1.000e-04  1.000e+04 ( 1.000e-14)
264        Index:  2.218e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
265        Scale:  2.055e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
604    Prefactor:  8.560e-01  9.098e-02  0.000e+00  1.000e+01 ( 1.000e+00)
605        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
606        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
600   Normalization:  1.200e+00  2.604e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 12.22
Ra Dec: 256.060 12.575
Photon Index (Fixed Index): 2.22 +/- 0.00
Photon Flux (Fixed Index): 1.28e-07 +/- 5.18e-08
Energy Flux (Fixed Index): 5.57e-05 +/- 2.25e-05

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) = 10984.3308262
delta logL = 0.0681506968849

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 10984.324829
delta logL = 0.0741478444179

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    161.98       1.0000         .10000E-03   10000.    
     2 'Index     '    2.3424       1.0000          .0000       10.000    
     3 'Normalizat'    1.1848       1.0000         .10000E-01   10.000    
     4 'Prefactor '    .85852       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6070E+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=   10984.32     FROM MIGRAD    STATUS=CONVERGED     80 CALLS      283 TOTAL
                     EDM=   .29E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     161.95        109.11        .15843E-03    .48655E-03
   2  Index         2.3423        .35602        .40102E-02    .53018E-03
   3  Normalizat    1.1848        .25980        .40062E-03   -.74234E-03
   4  Prefactor     .85862        .89375E-01    .15992E-03   -.25320E-02
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 161.955
  Index      = 2.34228
  Normalizat = 1.18476
  Prefactor  = 0.858623
 **********
 **   18 **HESSE 
 **********

 FCN=   10984.32     FROM HESSE     STATUS=OK            25 CALLS      308 TOTAL
                     EDM=   .28E-08    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     161.95        100.80        .31686E-04   -1.3156    
   2  Index         2.3423        .32858        .16041E-03   -.56042    
   3  Normalizat    1.1848        .25950        .80124E-04   -.87075    
   4  Prefactor     .85862        .89358E-01    .31983E-04   -.97602    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.80977e-09
Minuit parameter uncertainties:
  1  100.911
  2  0.328913
  3  0.259784
  4  0.0893732
shell-init: error retrieving current directory: getcwd: cannot access parent directories: No such file or directory
rmdir: failed to remove `/scratch/kocevski/373648': 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) = 10984.324827
delta logL = 0.0741498050156

Extracting fit parameters...

4FGL J1704.2+1234
   Spectrum: PowerLaw
263    Prefactor:  1.620e+02  1.009e+02  1.000e-04  1.000e+04 ( 1.000e-14)
264        Index:  2.342e+00  3.289e-01  0.000e+00  1.000e+01 (-1.000e+00)
265        Scale:  2.055e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
604    Prefactor:  8.586e-01  8.937e-02  0.000e+00  1.000e+01 ( 1.000e+00)
605        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
606        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
600   Normalization:  1.185e+00  2.598e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 12.34
Ra Dec: 256.060 12.575
Photon Index (Free Index): 2.34 +/- 0.33
Photon Flux (Free Index): 1.43e-07 +/- 6.80e-08
Energy Flux (Free Index): 5.09e-05 +/- 2.28e-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/373648/cmap_HighResolution_648864001_649123201_4FGL_J1704.2+1234_daily_bin1580.png

Cleaning up...

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

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='1.28e-07', energy_flux2='5.09e-05', photon_flux_error='5.18e-08', dlogl='7.41e-02', energy_flux='5.57e-05', photon_flux2='1.43e-07', job_status='DONE', time_completed='2021-09-16 14:55:52.876986', photon_index_error2='0.33', photon_index2='2.34', ts='12.22', fit_tolerance='1e-08', GAL='0.86', photon_index_error='0.00', energy_flux_error2='2.28e-05', EG='1.20', time_epoch_completed='1631829352.88', return_code='0', job_id='373648', GAL2='0.86', EG2='1.18', return_code2='0', energy_flux_error='2.25e-05', photon_flux_error2='6.80e-08', ts2='12.34', photon_index='2.22' WHERE bin_id='1580' AND source_name='4FGL J1704.2+1234' AND cadence='daily';

Database successfully updated.


Analysis Complete.


Thu Sep 16 14:55:52 PDT 2021


------------------------------------------------------------
Sender: LSF System <lsf@bullet0038>
Subject: Job 373648: <4FGL_J1704.2+1234_daily_bin1580> in cluster <slac> Done

Job <4FGL_J1704.2+1234_daily_bin1580> was submitted from host <rhel6-64n> by user <kocevski> in cluster <slac> at Thu Sep 16 14:40:35 2021
Job was executed on host(s) <bullet0038>, in queue <medium>, as user <kocevski> in cluster <slac> at Thu Sep 16 14:42:45 2021
</u/ki/kocevski> was used as the home directory.
</u/ki/kocevski> was used as the working directory.
Started at Thu Sep 16 14:42:45 2021
Terminated at Thu Sep 16 14:55:54 2021
Results reported at Thu Sep 16 14:55:54 2021

Your job looked like:

------------------------------------------------------------
# LSBATCH: User input
/nfs/farm/g/glast/g/LCRepository/Likelihood/Scripts/LikelihoodAnalysis.py 4FGL_J1704.2+1234_daily_bin1580 256.06 12.5752 648864001 649123201 irfs=P8R3_SOURCE_V2 zmax=90 ROI=12 association=4FGL_J1704.2+1234 fixedModel=True performFreeIndexFit=True freeVariableSources=True nuke=True repositoryJob=True verbose=False
------------------------------------------------------------

Successfully completed.

Resource usage summary:

    CPU time :                                   772.00 sec.
    Max Memory :                                 1094 MB
    Average Memory :                             333.30 MB
    Total Requested Memory :                     -
    Delta Memory :                               -
    Max Swap :                                   -
    Max Processes :                              5
    Max Threads :                                21
    Run time :                                   790 sec.
    Turnaround time :                            919 sec.

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

