/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

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).

/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).

number of points = 17422
number of fields = 31
RA_SUN column already exists. File will not be modified.
Done.


Performing analysis on: 4FGL_J1749.0+4321_weekly_bin802
RA = 267.255, Dec = 43.3616
tmin = 724032001, tmax = 724636801
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='36607250', job_status='RUN', time_executed='2023-12-19 01:05:58.710071', time_epoch_executed='1702976758.71' WHERE source_name='4FGL J1749.0+4321' and cadence='weekly' and bin_id='802'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/36607250

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/36607250/ft1_4FGL_J1749.0+4321_weekly_bin802.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/36607250/ft1_4FGL_J1749.0+4321_weekly_bin802.fits outfile=/lscratch/kocevski/36607250/ft1_filteredMKT_4FGL_J1749.0+4321_weekly_bin802.fits ra=267.255 dec=43.3616 rad=12.0 tmin=724032001.0 tmax=724636801.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.77
user 4.42
sys 0.24

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.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/36607250/ft1_filteredMKT_4FGL_J1749.0+4321_weekly_bin802.fits evtable="EVENTS" outfile="/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.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.55
user 0.22
sys 0.12

Number of photons that the gtmktime cut: 1879

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits" evtable="EVENTS" scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits sctable="SC_DATA" outfile=/lscratch/kocevski/36607250/ltcube_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.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/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits
.....................!
real 29.33
user 28.84
sys 0.23

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits sctable="SC_DATA" expcube=/lscratch/kocevski/36607250/ltcube_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits outfile=/lscratch/kocevski/36607250/expmap_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.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/36607250/ltcube_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits
.....................!
real 69.79
user 65.53
sys 3.90

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

Setting source of interest to:
4FGL J1749.0+4321 @ 267.255 43.3616

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits outfile=/lscratch/kocevski/36607250/cmap_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.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=267.255 yref=43.3616 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.47
user 0.24
sys 0.13

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits outfile=/lscratch/kocevski/36607250/cmap_HighResolution_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.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=267.255 yref=43.3616 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.48
user 0.26
sys 0.12

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits evtable="EVENTS" scfile=/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/36607250/Model_4FGL_J1749.0+4321_weekly_bin802.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/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits.....................!
real 61.29
user 59.73
sys 1.17

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits', '/lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits', expMap='/lscratch/kocevski/36607250/expmap_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits', expCube='/lscratch/kocevski/36607250/ltcube_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/36607250/Model_4FGL_J1749.0+4321_weekly_bin802.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J1749.0+4321'

4FGL J1749.0+4321
   Spectrum: PowerLaw
367    Prefactor:  4.281e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
368        Index:  2.087e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
369        Scale:  1.563e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/36607250/ft1_filtered_4FGL_J1749.0+4321_weekly_bin802.fits
Spacecraft file(s): /lscratch/kocevski/36607250/ft2_4FGL_J1749.0+4321_weekly_bin802.fits
Exposure map: /lscratch/kocevski/36607250/expmap_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits
Exposure cube: /lscratch/kocevski/36607250/ltcube_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/36607250/Model_4FGL_J1749.0+4321_weekly_bin802.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) = 19540.7845162

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'Prefactor '    .11654E-05   1.0000          .0000       .10000E+07
     2 'norm      '    2.5454       1.0000          .0000       .10000E+07
     3 'norm      '    .25042       1.0000          .0000       .10000E+07
     4 'Prefactor '    .86066E-04   1.0000          .0000       .10000E+07
     5 'norm      '    .94265E-01   1.0000          .0000       .10000E+07
     6 'norm      '    6.4693       1.0000          .0000       .10000E+07
     7 'norm      '    1.5434       1.0000          .0000       .10000E+07
     8 'Prefactor '    4.4353       1.0000          .0000       .10000E+07
     9 'norm      '    .12669E-05   1.0000          .0000       .10000E+07
    10 'Prefactor '    .10542E-03   1.0000          .0000       .10000E+07
    11 'Prefactor '    .55178E-02   1.0000          .0000       .10000E+07
    12 'norm      '    .34213E-04   1.0000          .0000       .10000E+07
    13 'Prefactor '    .31514E-03   1.0000          .0000       .10000E+07
    14 'Prefactor '    3.1088       1.0000          .0000       .10000E+07
    15 'Prefactor '    .66297E-02   1.0000          .0000       .10000E+07
    16 'Prefactor '    .82878E-07   1.0000          .0000       .10000E+07
    17 'Prefactor '    5.7373       1.0000          .0000       .10000E+07
    18 'norm      '    .78232       1.0000          .0000       .10000E+07
    19 'norm      '    .16220       1.0000          .0000       .10000E+07
    20 'norm      '    .45688E-02   1.0000          .0000       .10000E+07
    21 'Prefactor '    .34247E-03   1.0000          .0000       .10000E+07
    22 'Prefactor '    8.0632       1.0000          .0000       .10000E+07
    23 'norm      '    13.840       1.0000          .0000       .10000E+07
    24 'norm      '    8.5578       1.0000          .0000       .10000E+07
    25 'Normalizat'    1.6033       1.0000         .10000E-01   10.000    
    26 'Prefactor '    .78330       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .6770E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   19540.66     FROM MIGRAD    STATUS=CONVERGED    164 CALLS     1821 TOTAL
                     EDM=   .11E-09  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  3.4%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor      .0000        .73429       -.81268E-09** at limit **
   2  norm          2.5448        1.0335        .58985E-07    .16828E-02
   3  norm          .25017        .36325        .78270E-07   -.19869E-02
   4  Prefactor      .0000        2.5185        .40833E-06** at limit **
   5  norm          .94005E-01    .30889        .20556E-07** at limit **
   6  norm          6.4712        4.0677        .86066E-07   -.17516E-03
   7  norm          1.5432        1.0621       -.24160E-06   -.63659E-02
   8  Prefactor     4.4346        2.1512       -.87195E-07   -.44068E-03
   9  norm           .0000        .73411        .13425E-06** at limit **
  10  Prefactor     .55511E-10    33.890        .25399E-05** at limit **
  11  Prefactor     .36637E-08    19.014        .21253E-05** at limit **
  12  norm           .0000        1.9369       -.14270E-06** at limit **
  13  Prefactor     .47407E-07    10.183       -.93101E-06** at limit **
  14  Prefactor     3.1076        2.6937       -.31916E-06    .77335E-03
  15  Prefactor     .41633E-07    9.1281        .69111E-06** at limit **
  16  Prefactor      .0000        4.4615        .47769E-06** at limit **
  17  Prefactor     5.6208        5.1324       -.10731E-07    .26880E-03
  18  norm          .78226        .69011       -.18995E-06   -.23262E-02
  19  norm          .20007E-05    22.395        .19596E-05** at limit **
  20  norm          .28866E-08    3.1914       -.39118E-06** at limit **
  21  Prefactor     .55511E-10    5.9400       -.27852E-06** at limit **
  22  Prefactor     8.0353        3.7661       -.29463E-06    .77157E-03
  23  norm          13.852        6.7070       -.29052E-08   -.40481E-04
  24  norm          8.5635        5.5686        .69171E-08   -.87839E-04
  25  Normalizat    1.6036        .15747        .10829E-04   -.63309E-04
  26  Prefactor     .78343        .94968E-01   -.43663E-05   -.52131E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 0
  norm       = 2.5448
  norm       = 0.250172
  Prefactor  = 0
  norm       = 0.0940055
  norm       = 6.4712
  norm       = 1.54325
  Prefactor  = 4.43455
  norm       = 0
  Prefactor  = 5.55112e-11
  Prefactor  = 3.66374e-09
  norm       = 0
  Prefactor  = 4.74065e-08
  Prefactor  = 3.10762
  Prefactor  = 4.16334e-08
  Prefactor  = 0
  Prefactor  = 5.62084
  norm       = 0.782257
  norm       = 2.00068e-06
  norm       = 2.88658e-09
  Prefactor  = 5.55112e-11
  Prefactor  = 8.03532
  norm       = 13.8515
  norm       = 8.56352
  Normalizat = 1.6036
  Prefactor  = 0.783429
 **********
 **   18 **HESSE 
 **********

 FCN=   19540.66     FROM HESSE     STATUS=OK           520 CALLS     2341 TOTAL
                     EDM=   .25E-07    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor      .0000        .72899        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  norm          2.5448        1.0340        .63979E-04   -1.5676    
   3  norm          .25017        .38972        .24103E-02   -1.5698    
   4  Prefactor      .0000        2.5151        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   5  norm          .94005E-01    .21039        .26532E-02   -1.5702    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   6  norm          6.4712        4.0713        .39435E-03   -1.5657    
   7  norm          1.5432        1.0677        .85766E-03   -1.5683    
   8  Prefactor     4.4346        2.1529        .47792E-03   -1.5666    
   9  norm           .0000        .73545        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  10  Prefactor     .55511E-10    33.825        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  11  Prefactor     .36637E-08    19.335        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  12  norm           .0000        1.9343        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  Prefactor     .47407E-07    12.931        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  14  Prefactor     3.1076        2.6971        .57485E-03   -1.5673    
  15  Prefactor     .41633E-07    11.614        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor      .0000        4.4772        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  17  Prefactor     5.6208        5.1515        .41910E-03   -1.5661    
  18  norm          .78226        .68861        .54262E-03   -1.5690    
  19  norm          .20007E-05    12.788        .18711E-01   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  20  norm          .28866E-08    14.459        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  21  Prefactor     .55511E-10    5.9634        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  22  Prefactor     8.0353        3.7755        .35285E-03   -1.5651    
  23  norm          13.852        6.7128        .26898E-03   -1.5634    
  24  norm          8.5635        5.5672        .34243E-03   -1.5649    
  25  Normalizat    1.6036        .13301        .60718E-01   -.74907    
  26  Prefactor     .78343        .79700E-01    .43500E-01   -1.0034    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.45638e-08
Minuit parameter uncertainties:
  1  3.48762e-07
  2  1.03398
  3  0.389718
  4  3.52722e-07
  5  0.210386
  6  4.07135
  7  1.06767
  8  2.15295
  9  5.97924e-07
  10  8.22921e-05
  11  0.000533114
  12  9.84431e-06
  13  0.0015656
  14  2.69708
  15  0.00139108
  16  1.05507e-05
  17  5.15152
  18  0.688611
  19  0.0101165
  20  0.000408203
  21  3.32891e-05
  22  3.77547
  23  6.71279
  24  5.56725
  25  0.133042
  26  0.0797117
Done.

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

Extracting fit parameters...

4FGL J1749.0+4321
   Spectrum: PowerLaw
367    Prefactor:  5.621e+00  5.152e+00  0.000e+00  1.000e+06 ( 1.000e-13)
368        Index:  2.087e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
369        Scale:  1.563e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
674    Prefactor:  7.834e-01  7.971e-02  0.000e+00  1.000e+01 ( 1.000e+00)
675        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
676        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
673   Normalization:  1.604e+00  1.330e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 1.77
Ra Dec: 267.255 43.362
Photon Index (Fixed Index): 2.09 +/- 0.00
Photon Flux (Fixed Index): 1.60e-08 +/- 1.47e-08
Energy Flux (Fixed Index): 9.05e-06 +/- 8.29e-06

TS (Fixed Index): 1.77
Ra Dec: 267.255 43.362
Photon Flux Upper Limit: 4.91596540209e-08 ph cm-2 s-1
Energy Flux Upper Limit: 0.00371318563179 MeV cm-2 s-1

Saving results to:
/lscratch/kocevski/36607250/likelihoodResults_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.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) = 19540.6529983
delta logL = 0.00466366351975

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 19540.6515553
delta logL = 0.00610665198474

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.
 MACHINE ACCURACY LIMITS FURTHER IMPROVEMENT.

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   19540.65     FROM MIGRAD    STATUS=CONVERGED     98 CALLS      255 TOTAL
                     EDM=   .31E-10    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     5.9324        6.2815        .82397E-04    .24935E-02
   2  Index         2.0272        .56134        .99657E-02    .25216E-04
   3  Normalizat    1.6047        .15128        .26844E-03    .60815E-04
   4  Prefactor     .78303        .93987E-01    .22739E-03    .74995E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 5.93241
  Index      = 2.02724
  Normalizat = 1.60469
  Prefactor  = 0.783027
 **********
 **   18 **HESSE 
 **********

 FCN=   19540.65     FROM HESSE     STATUS=OK            27 CALLS      282 TOTAL
                     EDM=   .17E-11    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     5.9324        6.0248        .16479E-04   -1.5659    
   2  Index         2.0272        .53866        .39863E-03   -.63671    
   3  Normalizat    1.6047        .15138        .10738E-04   -.74878    
   4  Prefactor     .78303        .94060E-01    .90955E-05   -1.0036    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 1.68838e-12
Minuit parameter uncertainties:
  1  6.02477
  2  0.540287
  3  0.151427
  4  0.0940791
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) = 19540.6515551
delta logL = 0.00610693072304

Extracting fit parameters...

4FGL J1749.0+4321
   Spectrum: PowerLaw
367    Prefactor:  5.932e+00  6.025e+00  0.000e+00  1.000e+06 ( 1.000e-13)
368        Index:  2.027e+00  5.403e-01  0.000e+00  1.000e+01 (-1.000e+00)
369        Scale:  1.563e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
674    Prefactor:  7.830e-01  9.408e-02  0.000e+00  1.000e+01 ( 1.000e+00)
675        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
676        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
673   Normalization:  1.605e+00  1.514e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 1.78
Ra Dec: 267.255 43.362
Photon Index (Free Index): 2.03 +/- 0.54
Photon Flux (Free Index): 1.52e-08 +/- 1.61e-08
Energy Flux (Free Index): 9.83e-06 +/- 1.17e-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 /lscratch/kocevski/36607250/cmap_HighResolution_724032001_724636801_4FGL_J1749.0+4321_weekly_bin802.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET energy_flux_upper_limit='3.71e-03', comment='SUCCESS', photon_flux='1.60e-08', energy_flux2='9.83e-06', photon_flux_error='1.47e-08', dlogl='6.11e-03', energy_flux='9.05e-06', photon_flux2='1.52e-08', job_status='DONE', time_completed='2023-12-19 01:18:16.372608', photon_index_error2='0.54', photon_index2='2.03', ts='1.77', fit_tolerance='1e-08', GAL='0.78', photon_index_error='0.00', photon_flux_upper_limit='4.92e-08', energy_flux_error2='1.17e-05', EG='1.60', time_epoch_completed='1702977496.37', return_code='0', job_id='36607250', GAL2='0.78', EG2='1.60', return_code2='0', energy_flux_error='8.29e-06', photon_flux_error2='1.61e-08', ts2='1.78', photon_index='2.09' WHERE bin_id='802' AND source_name='4FGL J1749.0+4321' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Dec 19 01:18:16 PST 2023

