/sdf/group/fermi/u/kocevski/software/conda/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
number of points = 17691
number of fields = 31
RA_SUN column already exists. File will not be modified.

Likelihood Analysis Tool
Support Contact: Daniel Kocevski (daniel.kocevski@nasa.gov)

Importing modules...
This is make3FGLxml version 01r0.
The default diffuse model files and names are for pass 8 and assume you have v10r00p05 of the Fermi Science Tools or higher.
This is make4FGLDR3xml version 01r09.
The default diffuse model files and names are for P8R3, 4FGL DRs, and the default fermitools directory locations.

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

Done.


Performing analysis on: 4FGL_J1047.7+7238_weekly_bin777
RA = 161.939, Dec = 72.642
tmin = 708912001, tmax = 709516801
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='18867974', job_status='RUN', time_executed='2023-07-10 08:59:58.739921', time_epoch_executed='1689004798.74' WHERE source_name='4FGL J1047.7+7238' and cadence='weekly' and bin_id='777'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18867974

Creating custom pfile directory:
/lscratch/kocevski/18867974/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18867974/ft1_4FGL_J1047.7+7238_weekly_bin777.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18867974/ft1_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18867974/ft1_filteredMKT_4FGL_J1047.7+7238_weekly_bin777.fits ra=161.939 dec=72.642 rad=12.0 tmin=708912001.0 tmax=709516801.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.81
sys 0.21

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/18867974/ft1_filteredMKT_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" outfile="/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.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('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.52
user 0.21
sys 0.13

Number of photons that the gtmktime cut: 2771

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" o/sdf/group/fermi/u/kocevski/software/conda/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).

 **********
 **   18 **HESSE 
 **********

 FCN=   29427.35     FROM HESSE     STATUS=OK           562 CALLS     2036 TOTAL
                     EDM=   .95E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.803        13.798        .27682E-03   -1.5636    
   2  Prefactor     .83347        1.2921        .50612E-03   -1.5690    
   3  norm          2.7691        1.1348        .61140E-03   -1.5675    
   4  Prefactor     .11102E-09    3.2877        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .11990E-07    5.8417        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          2.3089        .45211        .67501E-03   -1.5678    
   7  norm          10.724        7.6774        .30537E-03   -1.5642    
   8  Prefactor     .16287        3.0945        .67310E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.3538        5.0622        .39795E-03   -1.5658    
  10  Prefactor     .66613E-09    10.192        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.447        2.2616        .29587E-03   -1.5640    
  12  norm          .11112        .55993        .73495E-02   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .55511E-10    59.206        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.4126        2.4539        .47861E-03   -1.5666    
  15  norm          1.6052        .44785        .83599E-03   -1.5683    
  16  norm          1.2972        1.1563        .97048E-03   -1.5685    
  17  Prefactor     .91889        5.8400        .45480E-03   -1.5689    
  18  Prefactor     3.6380        6.8941        .52891E-03   -1.5670    
  19  Prefactor      .0000        .71662        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .55511E-10    3.0142        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .49405E-08    5.1237        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     10.203        9.8208        .31340E-03   -1.5644    
  23  norm          2.5279        1.8353        .64230E-03   -1.5676    
  24  norm          8.2790        1.7579        .34819E-03   -1.5650    
  25  Prefactor     .66613E-09    8.9429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    1.0761        .86178E-01    .59331E-01   -.90521    
  27  Prefactor     1.0465        .76768E-01    .40104E-01   -.91194    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.5366e-08
Minuit parameter uncertainties:
  1  13.7977
  2  1.29214
  3  1.13484
  4  3.66677e-05
  5  0.000529177
  6  0.452109
  7  7.67744
  8  1.41984
  9  5.06218
  10  0.000166914
  11  2.26162
  12  0.498884
  13  8.82202e-05
  14  2.45395
  15  0.447853
  16  1.15632
  17  4.63309
  18  6.89414
  19  5.85501e-07
  20  2.19018e-05
  21  0.000319056
  22  9.82078
  23  1.8353
  24  1.75785
  25  0.000152273
  26  0.0861888
  27  0.0767762
Done.

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

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  4.413e+00  2.454e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.234e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.047e+00  7.678e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.076e+00  8.619e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.05
Ra Dec: 161.939 72.642
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.42e-08 +/- 1.90e-08
Energy Flux (Fixed Index): 1.45e-05 +/- 8.05e-06

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) = 29426.9801741
delta logL = 0.368579181843

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 29426.9758688
delta logL = 0.372884520766

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   29426.98     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      249 TOTAL
                     EDM=   .95E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9802        11.681        .58785E-03    .28002E-01
   2  Index         2.5475        1.2280        .14136        .65414E-03
   3  Normalizat    1.0639        .25556E-01    .59602E-01    .49796E-04
   4  Prefactor     1.0514        .21277E-01    .39830E-01    .36205E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.98016
  Index      = 2.54747
  Normalizat = 1.06386
  Prefactor  = 1.05137
 **********
 **   18 **HESSE 
 **********

 FCN=   29426.98     FROM HESSE     STATUS=OK            33 CALLS      282 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9802        2.7455        .12078E-04   -1.5673    
   2  Index         2.5475        .45372        .50897E-02   -.51267    
   3  Normalizat    1.0639        .96249E-01    .26359E-03   -.90921    
   4  Prefactor     1.0514        .87094E-01    .24227E-03   -.91036    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.01164e-10
Minuit parameter uncertainties:
  1  2.74554
  2  0.454539
  3  0.0962648
  4  0.0871055
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) = 29426.9758687
delta logL = 0.37288456782

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  2.980e+00  2.746e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.547e+00  4.545e-01  0.000e+00  1.000e+01 (-1.000e+00)
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.051e+00  8.711e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.064e+00  9.626e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.88
Ra Dec: 161.939 72.642
Photon Index (Free Index): 2.55 +/- 0.45
Photon Flux (Free Index): 4.84e-08 +/- 2.48e-08
Energy Flux (Free Index): 1.33e-05 +/- 6.16e-06

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 /lscratch/kocevski/18864959/cmap_HighResolution_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.42e-08', energy_flux2='1.33e-05', photon_flux_error='1.90e-08', dlogl='3.73e-01', energy_flux='1.45e-05', photon_flux2='4.84e-08', job_status='DONE', time_completed='2023-07-10 09:05:22.116063', photon_index_error2='0.45', photon_index2='2.55', ts='8.05', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', energy_flux_error2='6.16e-06', EG='1.08', time_epoch_completed='1689005122.12', return_code='0', job_id='18864959', GAL2='1.05', EG2='1.06', return_code2='0', energy_flux_error='8.05e-06', photon_flux_error2='2.48e-08', ts2='8.88', photon_index='2.23' WHERE bin_id='777' AND source_name='4FGL J1047.7+7238' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:05:22 PDT 2023

utfile=/lscratch/kocevski/18867974/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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 /lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits
.....................!
real 17.64
user 17.09
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18867974/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18867974/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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 /lscratch/kocevski/18867974/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
.....................!
real 64.69
user 60.34
sys 3.73

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

Setting source of interest to:
4FGL J1047.7+7238 @ 161.939 72.642

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18867974/cmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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=161.939 yref=72.642 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.65
user 0.23
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18867974/cmap_HighResolution_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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=161.939 yref=72.642 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.59
user 0.23
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" scfile=/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18867974/Model_4FGL_J1047.7+7238_weekly_bin777.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 GALnumber of points = 17691
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1047.7+7238_weekly_bin777
RA = 161.939, Dec = 72.642
tmin = 708912001, tmax = 709516801
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='18868678', job_status='RUN', time_executed='2023-07-10 09:03:05.898286', time_epoch_executed='1689004985.9' WHERE source_name='4FGL J1047.7+7238' and cadence='weekly' and bin_id='777'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/18868678

Creating custom pfile directory:
/lscratch/kocevski/18868678/pfiles/

Retrieving the FT1 file...

Issuing command:
datacat find --group FT1 --filter 'nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Reprocess/P305

Issuing command:
datacat find --group FT1 --filter 'nMetStart>564945418 && nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/18868678/ft1_4FGL_J1047.7+7238_weekly_bin777.fits


Retrieving the FT1 file...

Issuing command:
datacat find --group FT2 --filter 'nMetStop>=708912001.0 && nMetStart<709516801.0' /Data/Flight/Level1/LPA

Retrieving 108 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/18868678/ft1_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18868678/ft1_filteredMKT_4FGL_J1047.7+7238_weekly_bin777.fits ra=161.939 dec=72.642 rad=12.0 tmin=708912001.0 tmax=709516801.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.53
user 3.04
sys 0.23

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" filter="IN_SAA!=T && LIVETIME>0 && gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))" roicut=no evfile=/lscratch/kocevski/18868678/ft1_filteredMKT_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" outfile="/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.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('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nogrb.gti',(START+STOP)/2) && (angsep(RA_SUN,DEC_SUN,RA_ZENITH,DEC_ZENITH)>115 || gtifilter('/sdf/group/fermi/g/LCRepository/Likelihood/GTIs/nosolarflares.gti',(START+STOP)/2))
real 0.62
user 0.22
sys 0.14

Number of photons that the gtmktime cut: 2771

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits" evtable="EVENTS" scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" outfile=/lscratch/kocevski/18868678/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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 /lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits
.....................!
real 19.63
user 19.00
sys 0.27

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" expcube=/lscratch/kocevski/18868678/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18868678/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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 /lscratch/kocevski/18868678/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
.....................!
real 71.43
user 66.56
sys 4.20

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

Setting source of interest to:
4FGL J1047.7+7238 @ 161.939 72.642

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18868678/cmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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=161.939 yref=72.642 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.25
sys 0.12

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits outfile=/lscratch/kocevski/18868678/cmap_HighResolution_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.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=161.939 yref=72.642 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.52
user 0.26
sys 0.13

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits evtable="EVENTS" scfile=/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/18868678/Model_4FGL_J1047.7+7238_weekly_bin777.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...
/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits.....................!
real 110.10
user 107.71
sys 1.42

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits', '/lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits', expMap='/lscratch/kocevski/18867974/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits', expCube='/lscratch/kocevski/18867974/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18867974/Model_4FGL_J1047.7+7238_weekly_bin777.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1047.7+7238'

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  1.026e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.234e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18867974/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits
Spacecraft file(s): /lscratch/kocevski/18867974/ft2_4FGL_J1047.7+7238_weekly_bin777.fits
Exposure map: /lscratch/kocevski/18867974/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
Exposure cube: /lscratch/kocevski/18867974/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18867974/Model_4FGL_J1047.7+7238_weekly_bin777.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) = 29430.6019959

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.069       1.0000          .0000       .10000E+07
     2 'Prefactor '    .83156       1.0000          .0000       .10000E+07
     3 'norm      '    2.7687       1.0000          .0000       .10000E+07
     4 'Prefactor '    .30342E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '     .0000       1.0000          .0000       .10000E+07
     6 'norm      '    2.3087       1.0000          .0000       .10000E+07
     7 'norm      '    10.747       1.0000          .0000       .10000E+07
     8 'Prefactor '    .84517E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    6.3543       1.0000          .0000       .10000E+07
    10 'Prefactor '    .19478E-02   1.0000          .0000       .10000E+07
    11 'norm      '    11.446       1.0000          .0000       .10000E+07
    12 'norm      '    .11548       1.0000          .0000       .10000E+07
    13 'Prefactor '    .13842E-02   1.0000          .0000       .10000E+07
    14 'Prefactor '    4.4228       1.0000          .0000       .10000E+07
    15 'norm      '    1.6056       1.0000          .0000       .10000E+07
    16 'norm      '    1.2972       1.0000          .0000       .10000E+07
    17 'Prefactor '    .90406       1.0000          .0000       .10000E+07
    18 'Prefactor '    3.6446       1.0000          .0000       .10000E+07
    19 'Prefactor '    .72164E-09   1.0000          .0000       .10000E+07
    20 'Prefactor '    .18341E-06   1.0000          .0000       .10000E+07
    21 'Prefactor '    .11715E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    10.206       1.0000          .0000       .10000E+07
    23 'norm      '    2.5271       1.0000          .0000       .10000E+07
    24 'norm      '    8.2788       1.0000          .0000       .10000E+07
    25 'Prefactor '    .27076E-03   1.0000          .0000       .10000E+07
    26 'Normalizat'    1.0761       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.0468       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   29427.35     FROM MIGRAD    STATUS=CONVERGED    177 CALLS     1474 TOTAL
                     EDM=   .88E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.803        1.4269       -.56787E-08   -.96093E-02
   2  Prefactor     .83347        1.2771        .11698E-07   -.29717E-04
   3  norm          2.7691        1.1316       -.71198E-08   -.47290E-03
   4  Prefactor     .11102E-09    3.2749        .61297E-07** at limit **
   5  Prefactor     .11990E-07    5.2585       -.40632E-07** at limit **
   6  norm          2.3089        .45014       -.22796E-08   -.71779E-03
   7  norm          10.724        7.6968       -.55735E-08   -.61496E-04
   8  Prefactor     .16287        42.244       -.13162E-05** at limit **
   9  Prefactor     6.3538        4.9810        .82188E-08    .17463E-02
  10  Prefactor     .66613E-09    10.156       -.12710E-06** at limit **
  11  norm          11.447        2.2619       -.21198E-08    .23972E-03
  12  norm          .11112        6.3810       -.72160E-07** at limit **
  13  Prefactor     .55511E-10    59.219       -.24092E-06** at limit **
  14  Prefactor     4.4126        2.4561        .84182E-08   -.36665E-03
  15  norm          1.6052        .44098        .35336E-08   -.11543E-02
  16  norm          1.2972        1.1247       -.38515E-09   -.17747E-03
  17  Prefactor     .91889        2.8800        .75943E-07   -.20553E-01
  18  Prefactor     3.6380        6.8828       -.10163E-06   -.39256E-03
  19  Prefactor      .0000        .72026        .42250E-08** at limit **
  20  Prefactor     .55511E-10    3.0290        .11059E-07** at limit **
  21  Prefactor     .49405E-08    4.8357        .93375E-08** at limit **
  22  Prefactor     10.203        9.0395        .52945E-07    .18181E-01
  23  norm          2.5279        1.8338       -.22881E-08   -.10900E-05
  24  norm          8.2790        1.7538        .34522E-08    .68945E-03
  25  Prefactor     .66613E-09    8.9126        .78386E-07** at limit **
  26  Normalizat    1.0761        .98027E-01    .64992E-06    .34695E-05
  27  Prefactor     1.0465        .87948E-01   -.46420E-06   -.13313E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.8029
  Prefactor  = 0.833472
  norm       = 2.76913
  Prefactor  = 1.11022e-10
  Prefactor  = 1.19904e-08
  norm       = 2.30889
  norm       = 10.7244
  Prefactor  = 0.162866
  Prefactor  = 6.35383
  Prefactor  = 6.66134e-10
  norm       = 11.447
  norm       = 0.111123
  Prefactor  = 5.55112e-11
  Prefactor  = 4.41259
  norm       = 1.6052
  norm       = 1.29724
  Prefactor  = 0.918893
  Prefactor  = 3.63797
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 4.94049e-09
  Prefactor  = 10.2032
  norm       = 2.52791
  norm       = 8.279
  Prefactor  = 6.66134e-10
  Normalizat = 1.07614
  Prefactor  = 1.04653
 **********
 **   18 **HESSE 
 **********

 FCN=   29427.35     FROM HESSE     STATUS=OK           562 CALLS     2036 TOTAL
                     EDM=   .95E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.803        13.798        .27682E-03   -1.5636    
   2  Prefactor     .83347        1.2921        .50612E-03   -1.5690    
   3  norm          2.7691        1.1348        .61140E-03   -1.5675    
   4  Prefactor     .11102E-09    3.2877        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .11990E-07    5.8417        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          2.3089        .45211        .67501E-03   -1.5678    
   7  norm          10.724        7.6774        .30537E-03   -1.5642    
   8  Prefactor     .16287        3.0945        .67310E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.3538        5.0622        .39795E-03   -1.5658    
  10  Prefactor     .66613E-09    10.192        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.447        2.2616        .29587E-03   -1.5640    
  12  norm          .11112        .55993        .73495E-02   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .55511E-10    59.206        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.4126        2.4539        .47861E-03   -1.5666    
  15  norm          1.6052        .44785        .83599E-03   -1.5683    
  16  norm          1.2972        1.1563        .97048E-03   -1.5685    
  17  Prefactor     .91889        5.8400        .45480E-03   -1.5689    
  18  Prefactor     3.6380        6.8941        .52891E-03   -1.5670    
  19  Prefactor      .0000        .71662        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .55511E-10    3.0142        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .49405E-08    5.1237        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     10.203        9.8208        .31340E-03   -1.5644    
  23  norm          2.5279        1.8353        .64230E-03   -1.5676    
  24  norm          8.2790        1.7579        .34819E-03   -1.5650    
  25  Prefactor     .66613E-09    8.9429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    1.0761        .86178E-01    .59331E-01   -.90521    
  27  Prefactor     1.0465        .76768E-01    .40104E-01   -.91194    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.5366e-08
Minuit parameter uncertainties:
  1  13.7977
  2  1.29214
  3  1.13484
  4  3.66677e-05
  5  0.000529177
  6  0.452109
  7  7.67744
  8  1.41984
  9  5.06218
  10  0.000166914
  11  2.26162
  12  0.498884
  13  8.82202e-05
  14  2.45395
  15  0.447853
  16  1.15632
  17  4.63309
  18  6.89414
  19  5.85501e-07
  20  2.19018e-05
  21  0.000319056
  22  9.82078
  23  1.8353
  24  1.75785
  25  0.000152273
  26  0.0861888
  27  0.0767762
Done.

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

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  4.413e+00  2.454e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.234e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.047e+00  7.678e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.076e+00  8.619e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.05
Ra Dec: 161.939 72.642
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.42e-08 +/- 1.90e-08
Energy Flux (Fixed Index): 1.45e-05 +/- 8.05e-06

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) = 29426.9801741
delta logL = 0.368579181843

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 29426.9758688
delta logL = 0.372884520766

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   29426.98     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      249 TOTAL
                     EDM=   .95E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9802        11.681        .58785E-03    .28002E-01
   2  Index         2.5475        1.2280        .14136        .65414E-03
   3  Normalizat    1.0639        .25556E-01    .59602E-01    .49796E-04
   4  Prefactor     1.0514        .21277E-01    .39830E-01    .36205E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.98016
  Index      = 2.54747
  Normalizat = 1.06386
  Prefactor  = 1.05137
 **********
 **   18 **HESSE 
 **********

 FCN=   29426.98     FROM HESSE     STATUS=OK            33 CALLS      282 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9802        2.7455        .12078E-04   -1.5673    
   2  Index         2.5475        .45372        .50897E-02   -.51267    
   3  Normalizat    1.0639        .96249E-01    .26359E-03   -.90921    
   4  Prefactor     1.0514        .87094E-01    .24227E-03   -.91036    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.01164e-10
Minuit parameter uncertainties:
  1  2.74554
  2  0.454539
  3  0.0962648
  4  0.0871055
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) = 29426.9758687
delta logL = 0.37288456782

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  2.980e+00  2.746e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.547e+00  4.545e-01  0.000e+00  1.000e+01 (-1.000e+00)
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.051e+00  8.711e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.064e+00  9.626e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.88
Ra Dec: 161.939 72.642
Photon Index (Free Index): 2.55 +/- 0.45
Photon Flux (Free Index): 4.84e-08 +/- 2.48e-08
Energy Flux (Free Index): 1.33e-05 +/- 6.16e-06

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 /lscratch/kocevski/18867974/cmap_HighResolution_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.42e-08', energy_flux2='1.33e-05', photon_flux_error='1.90e-08', dlogl='3.73e-01', energy_flux='1.45e-05', photon_flux2='4.84e-08', job_status='DONE', time_completed='2023-07-10 09:14:48.574124', photon_index_error2='0.45', photon_index2='2.55', ts='8.05', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', energy_flux_error2='6.16e-06', EG='1.08', time_epoch_completed='1689005688.57', return_code='0', job_id='18867974', GAL2='1.05', EG2='1.06', return_code2='0', energy_flux_error='8.05e-06', photon_flux_error2='2.48e-08', ts2='8.88', photon_index='2.23' WHERE bin_id='777' AND source_name='4FGL J1047.7+7238' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:14:48 PDT 2023

V02
Working on...
/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits.....................!
real 121.14
user 119.37
sys 0.89

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits', '/lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits', expMap='/lscratch/kocevski/18868678/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits', expCube='/lscratch/kocevski/18868678/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/18868678/Model_4FGL_J1047.7+7238_weekly_bin777.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1047.7+7238'

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  1.026e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.234e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/18868678/ft1_filtered_4FGL_J1047.7+7238_weekly_bin777.fits
Spacecraft file(s): /lscratch/kocevski/18868678/ft2_4FGL_J1047.7+7238_weekly_bin777.fits
Exposure map: /lscratch/kocevski/18868678/expmap_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
Exposure cube: /lscratch/kocevski/18868678/ltcube_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/18868678/Model_4FGL_J1047.7+7238_weekly_bin777.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) = 29430.6019959

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    13.069       1.0000          .0000       .10000E+07
     2 'Prefactor '    .83156       1.0000          .0000       .10000E+07
     3 'norm      '    2.7687       1.0000          .0000       .10000E+07
     4 'Prefactor '    .30342E-06   1.0000          .0000       .10000E+07
     5 'Prefactor '     .0000       1.0000          .0000       .10000E+07
     6 'norm      '    2.3087       1.0000          .0000       .10000E+07
     7 'norm      '    10.747       1.0000          .0000       .10000E+07
     8 'Prefactor '    .84517E-02   1.0000          .0000       .10000E+07
     9 'Prefactor '    6.3543       1.0000          .0000       .10000E+07
    10 'Prefactor '    .19478E-02   1.0000          .0000       .10000E+07
    11 'norm      '    11.446       1.0000          .0000       .10000E+07
    12 'norm      '    .11548       1.0000          .0000       .10000E+07
    13 'Prefactor '    .13842E-02   1.0000          .0000       .10000E+07
    14 'Prefactor '    4.4228       1.0000          .0000       .10000E+07
    15 'norm      '    1.6056       1.0000          .0000       .10000E+07
    16 'norm      '    1.2972       1.0000          .0000       .10000E+07
    17 'Prefactor '    .90406       1.0000          .0000       .10000E+07
    18 'Prefactor '    3.6446       1.0000          .0000       .10000E+07
    19 'Prefactor '    .72164E-09   1.0000          .0000       .10000E+07
    20 'Prefactor '    .18341E-06   1.0000          .0000       .10000E+07
    21 'Prefactor '    .11715E-04   1.0000          .0000       .10000E+07
    22 'Prefactor '    10.206       1.0000          .0000       .10000E+07
    23 'norm      '    2.5271       1.0000          .0000       .10000E+07
    24 'norm      '    8.2788       1.0000          .0000       .10000E+07
    25 'Prefactor '    .27076E-03   1.0000          .0000       .10000E+07
    26 'Normalizat'    1.0761       1.0000         .10000E-01   10.000    
    27 'Prefactor '    1.0468       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .7030E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   29427.35     FROM MIGRAD    STATUS=CONVERGED    177 CALLS     1474 TOTAL
                     EDM=   .88E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.2%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     12.803        1.4269       -.56787E-08   -.96093E-02
   2  Prefactor     .83347        1.2771        .11698E-07   -.29717E-04
   3  norm          2.7691        1.1316       -.71198E-08   -.47290E-03
   4  Prefactor     .11102E-09    3.2749        .61297E-07** at limit **
   5  Prefactor     .11990E-07    5.2585       -.40632E-07** at limit **
   6  norm          2.3089        .45014       -.22796E-08   -.71779E-03
   7  norm          10.724        7.6968       -.55735E-08   -.61496E-04
   8  Prefactor     .16287        42.244       -.13162E-05** at limit **
   9  Prefactor     6.3538        4.9810        .82188E-08    .17463E-02
  10  Prefactor     .66613E-09    10.156       -.12710E-06** at limit **
  11  norm          11.447        2.2619       -.21198E-08    .23972E-03
  12  norm          .11112        6.3810       -.72160E-07** at limit **
  13  Prefactor     .55511E-10    59.219       -.24092E-06** at limit **
  14  Prefactor     4.4126        2.4561        .84182E-08   -.36665E-03
  15  norm          1.6052        .44098        .35336E-08   -.11543E-02
  16  norm          1.2972        1.1247       -.38515E-09   -.17747E-03
  17  Prefactor     .91889        2.8800        .75943E-07   -.20553E-01
  18  Prefactor     3.6380        6.8828       -.10163E-06   -.39256E-03
  19  Prefactor      .0000        .72026        .42250E-08** at limit **
  20  Prefactor     .55511E-10    3.0290        .11059E-07** at limit **
  21  Prefactor     .49405E-08    4.8357        .93375E-08** at limit **
  22  Prefactor     10.203        9.0395        .52945E-07    .18181E-01
  23  norm          2.5279        1.8338       -.22881E-08   -.10900E-05
  24  norm          8.2790        1.7538        .34522E-08    .68945E-03
  25  Prefactor     .66613E-09    8.9126        .78386E-07** at limit **
  26  Normalizat    1.0761        .98027E-01    .64992E-06    .34695E-05
  27  Prefactor     1.0465        .87948E-01   -.46420E-06   -.13313E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 12.8029
  Prefactor  = 0.833472
  norm       = 2.76913
  Prefactor  = 1.11022e-10
  Prefactor  = 1.19904e-08
  norm       = 2.30889
  norm       = 10.7244
  Prefactor  = 0.162866
  Prefactor  = 6.35383
  Prefactor  = 6.66134e-10
  norm       = 11.447
  norm       = 0.111123
  Prefactor  = 5.55112e-11
  Prefactor  = 4.41259
  norm       = 1.6052
  norm       = 1.29724
  Prefactor  = 0.918893
  Prefactor  = 3.63797
  Prefactor  = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 4.94049e-09
  Prefactor  = 10.2032
  norm       = 2.52791
  norm       = 8.279
  Prefactor  = 6.66134e-10
  Normalizat = 1.07614
  Prefactor  = 1.04653
 **********
 **   18 **HESSE 
 **********

 FCN=   29427.35     FROM HESSE     STATUS=OK           562 CALLS     2036 TOTAL
                     EDM=   .95E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     12.803        13.798        .27682E-03   -1.5636    
   2  Prefactor     .83347        1.2921        .50612E-03   -1.5690    
   3  norm          2.7691        1.1348        .61140E-03   -1.5675    
   4  Prefactor     .11102E-09    3.2877        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  Prefactor     .11990E-07    5.8417        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          2.3089        .45211        .67501E-03   -1.5678    
   7  norm          10.724        7.6774        .30537E-03   -1.5642    
   8  Prefactor     .16287        3.0945        .67310E-02   -1.5700    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     6.3538        5.0622        .39795E-03   -1.5658    
  10  Prefactor     .66613E-09    10.192        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  norm          11.447        2.2616        .29587E-03   -1.5640    
  12  norm          .11112        .55993        .73495E-02   -1.5701    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .55511E-10    59.206        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     4.4126        2.4539        .47861E-03   -1.5666    
  15  norm          1.6052        .44785        .83599E-03   -1.5683    
  16  norm          1.2972        1.1563        .97048E-03   -1.5685    
  17  Prefactor     .91889        5.8400        .45480E-03   -1.5689    
  18  Prefactor     3.6380        6.8941        .52891E-03   -1.5670    
  19  Prefactor      .0000        .71662        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  Prefactor     .55511E-10    3.0142        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .49405E-08    5.1237        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     10.203        9.8208        .31340E-03   -1.5644    
  23  norm          2.5279        1.8353        .64230E-03   -1.5676    
  24  norm          8.2790        1.7579        .34819E-03   -1.5650    
  25  Prefactor     .66613E-09    8.9429        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  26  Normalizat    1.0761        .86178E-01    .59331E-01   -.90521    
  27  Prefactor     1.0465        .76768E-01    .40104E-01   -.91194    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 9.5366e-08
Minuit parameter uncertainties:
  1  13.7977
  2  1.29214
  3  1.13484
  4  3.66677e-05
  5  0.000529177
  6  0.452109
  7  7.67744
  8  1.41984
  9  5.06218
  10  0.000166914
  11  2.26162
  12  0.498884
  13  8.82202e-05
  14  2.45395
  15  0.447853
  16  1.15632
  17  4.63309
  18  6.89414
  19  5.85501e-07
  20  2.19018e-05
  21  0.000319056
  22  9.82078
  23  1.8353
  24  1.75785
  25  0.000152273
  26  0.0861888
  27  0.0767762
Done.

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

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  4.413e+00  2.454e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.234e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.047e+00  7.678e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.076e+00  8.619e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 8.05
Ra Dec: 161.939 72.642
Photon Index (Fixed Index): 2.23 +/- 0.00
Photon Flux (Fixed Index): 3.42e-08 +/- 1.90e-08
Energy Flux (Fixed Index): 1.45e-05 +/- 8.05e-06

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) = 29426.9801741
delta logL = 0.368579181843

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 29426.9758688
delta logL = 0.372884520766

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   29426.98     FROM MIGRAD    STATUS=CONVERGED     51 CALLS      249 TOTAL
                     EDM=   .95E-10    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     2.9802        11.681        .58785E-03    .28002E-01
   2  Index         2.5475        1.2280        .14136        .65414E-03
   3  Normalizat    1.0639        .25556E-01    .59602E-01    .49796E-04
   4  Prefactor     1.0514        .21277E-01    .39830E-01    .36205E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 2.98016
  Index      = 2.54747
  Normalizat = 1.06386
  Prefactor  = 1.05137
 **********
 **   18 **HESSE 
 **********

 FCN=   29426.98     FROM HESSE     STATUS=OK            33 CALLS      282 TOTAL
                     EDM=   .10E-09    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     2.9802        2.7455        .12078E-04   -1.5673    
   2  Index         2.5475        .45372        .50897E-02   -.51267    
   3  Normalizat    1.0639        .96249E-01    .26359E-03   -.90921    
   4  Prefactor     1.0514        .87094E-01    .24227E-03   -.91036    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.01164e-10
Minuit parameter uncertainties:
  1  2.74554
  2  0.454539
  3  0.0962648
  4  0.0871055
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) = 29426.9758687
delta logL = 0.37288456782

Extracting fit parameters...

4FGL J1047.7+7238
   Spectrum: PowerLaw
374    Prefactor:  2.980e+00  2.746e+00  0.000e+00  1.000e+06 ( 1.000e-13)
375        Index:  2.547e+00  4.545e-01  0.000e+00  1.000e+01 (-1.000e+00)
376        Scale:  2.160e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
700    Prefactor:  1.051e+00  8.711e-02  0.000e+00  1.000e+01 ( 1.000e+00)
701        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
702        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
699   Normalization:  1.064e+00  9.626e-02  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 8.88
Ra Dec: 161.939 72.642
Photon Index (Free Index): 2.55 +/- 0.45
Photon Flux (Free Index): 4.84e-08 +/- 2.48e-08
Energy Flux (Free Index): 1.33e-05 +/- 6.16e-06

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 /lscratch/kocevski/18868678/cmap_HighResolution_708912001_709516801_4FGL_J1047.7+7238_weekly_bin777.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='3.42e-08', energy_flux2='1.33e-05', photon_flux_error='1.90e-08', dlogl='3.73e-01', energy_flux='1.45e-05', photon_flux2='4.84e-08', job_status='DONE', time_completed='2023-07-10 09:19:19.757089', photon_index_error2='0.45', photon_index2='2.55', ts='8.05', fit_tolerance='1e-08', GAL='1.05', photon_index_error='0.00', energy_flux_error2='6.16e-06', EG='1.08', time_epoch_completed='1689005959.76', return_code='0', job_id='18868678', GAL2='1.05', EG2='1.06', return_code2='0', energy_flux_error='8.05e-06', photon_flux_error2='2.48e-08', ts2='8.88', photon_index='2.23' WHERE bin_id='777' AND source_name='4FGL J1047.7+7238' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Mon Jul 10 09:19:20 PDT 2023

