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


Performing analysis on: 4FGL_J0535.3+0934_weekly_bin784
RA = 83.8408, Dec = 9.5824
tmin = 713145601, tmax = 713750401
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='28615391', job_status='RUN', time_executed='2023-09-19 22:40:57.270662', time_epoch_executed='1695188457.27' WHERE source_name='4FGL J0535.3+0934' and cadence='weekly' and bin_id='784'

Database successfully updated.
Done.

Creating custom output directory:
/lscratch/kocevski/28615391

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

Retrieving the FT1 file...

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

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

Retrieving 107 files...
Done.


Merging files...

Checksum keywords updated successfully.

Merged file saved to:
/lscratch/kocevski/28615391/ft1_4FGL_J0535.3+0934_weekly_bin784.fits


Retrieving the FT1 file...

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

Retrieving 107 files...
Done.


Merging files...

Merged file saved to:
/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits


Selecting the photons:
time -p gtselect infile=/lscratch/kocevski/28615391/ft1_4FGL_J0535.3+0934_weekly_bin784.fits outfile=/lscratch/kocevski/28615391/ft1_filteredMKT_4FGL_J0535.3+0934_weekly_bin784.fits ra=83.8408 dec=9.5824 rad=12.0 tmin=713145601.0 tmax=713750401.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.21
user 3.89
sys 0.27

Adding sun position to ft2 file:
/sdf/group/fermi/g/LCRepository/Repository/bin/sunpos /lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits

Selecting the good time intervals:
time -p gtmktime scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.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/28615391/ft1_filteredMKT_4FGL_J0535.3+0934_weekly_bin784.fits evtable="EVENTS" outfile="/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.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.41
user 0.25
sys 0.13

Number of photons that the gtmktime cut: 4412

Generating the livetime cube:
time -p gtltcube evfile="/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits" evtable="EVENTS" scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits sctable="SC_DATA" outfile=/lscratch/kocevski/28615391/ltcube_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.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/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits
.....................!
real 18.90
user 18.55
sys 0.22

Generating the exposure map:
time -p gtexpmap evfile=/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits evtable="EVENTS" scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits sctable="SC_DATA" expcube=/lscratch/kocevski/28615391/ltcube_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits outfile=/lscratch/kocevski/28615391/expmap_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.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/28615391/ltcube_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits
.....................!
real 68.11
user 64.10
sys 3.63

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 IC 443 in ROI with RadialGaussian spatial model.
Extended source Rosette in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/Rosette.fits is the correct path to the extended template.
Extended source Monoceros in ROI with RadialGaussian spatial model.
Extended source S 147 in ROI, make sure /sdf/group/fermi/g/LCRepository/Likelihood/ExtendedSources/Extended_8years/Templates/S147.fits is the correct path to the extended template.
Added 166 point sources and 4 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 J0535.3+0934 @ 83.8408 9.5824

Creating the counts map:
time -p gtbin evfile=/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits outfile=/lscratch/kocevski/28615391/cmap_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.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=83.8408 yref=9.5824 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.42
user 0.25
sys 0.14

Creating the high resolution counts map:
time -p gtbin evfile=/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits outfile=/lscratch/kocevski/28615391/cmap_HighResolution_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.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=83.8408 yref=9.5824 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.41
user 0.25
sys 0.14

Computing the diffuse response:
time -p gtdiffrsp evfile=/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits evtable="EVENTS" scfile=/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits sctable="SC_DATA" srcmdl=/lscratch/kocevski/28615391/Model_4FGL_J0535.3+0934_weekly_bin784.xml irfs="P8R3_SOURCE_V2" evclsmin=0 evclass="INDEF" evtype="INDEF" convert=yes chatter=2 clobber=yes debug=no gui=no mode="ql"

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

adding source EG_v02
adding source GAL_V02
adding source IC 443
adding source Monoceros
adding source Rosette
adding source S 147
Working on...
/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits.....................!
real 411.76
user 408.37
sys 0.90

Creating the likelihood object...
obs = UnbinnedObs('/lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits', '/lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits', expMap='/lscratch/kocevski/28615391/expmap_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits', expCube='/lscratch/kocevski/28615391/ltcube_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits', irfs='P8R3_SOURCE_V2')
like = UnbinnedAnalysis(obs, '/lscratch/kocevski/28615391/Model_4FGL_J0535.3+0934_weekly_bin784.xml', optimizer='MINUIT')

Using source of interest name: '4FGL J0535.3+0934'

4FGL J0535.3+0934
   Spectrum: PowerLaw
257    Prefactor:  3.878e+00  0.000e+00  0.000e+00  1.000e+06 ( 1.000e-13)
258        Index:  2.624e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  1.059e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed


Likelihood Fit Parameters:
Event file(s): /lscratch/kocevski/28615391/ft1_filtered_4FGL_J0535.3+0934_weekly_bin784.fits
Spacecraft file(s): /lscratch/kocevski/28615391/ft2_4FGL_J0535.3+0934_weekly_bin784.fits
Exposure map: /lscratch/kocevski/28615391/expmap_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits
Exposure cube: /lscratch/kocevski/28615391/ltcube_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.fits
IRFs: P8R3_SOURCE_V2
Source model file: /lscratch/kocevski/28615391/Model_4FGL_J0535.3+0934_weekly_bin784.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) = 43440.5951056

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

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

Fit tolerance = 1e-08

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

 PARAMETER DEFINITIONS:
    NO.   NAME         VALUE      STEP SIZE      LIMITS
     1 'norm      '    .32474E-07   1.0000          .0000       .10000E+07
     2 'Prefactor '    5.2000       1.0000          .0000       .10000E+07
     3 'Prefactor '    56.174       1.0000          .0000       .10000E+07
     4 'Prefactor '    2.9191       1.0000          .0000       .10000E+07
     5 'norm      '    .62724       1.0000          .0000       .10000E+07
     6 'norm      '    12.107       1.0000          .0000       .10000E+07
     7 'Prefactor '    1.6405       1.0000          .0000       .10000E+07
     8 'norm      '    .23850E-01   1.0000          .0000       .10000E+07
     9 'Prefactor '    2.0726       1.0000          .0000       .10000E+07
    10 'Prefactor '    35.202       1.0000          .0000       .10000E+07
    11 'Prefactor '    .71316       1.0000          .0000       .10000E+07
    12 'norm      '    .76118E-03   1.0000          .0000       .10000E+07
    13 'norm      '    .34707       1.0000          .0000       .10000E+07
    14 'Prefactor '    30.482       1.0000          .0000       .10000E+07
    15 'Prefactor '    .81107E-06   1.0000          .0000       .10000E+07
    16 'Prefactor '    8.3942       1.0000          .0000       .10000E+07
    17 'norm      '    .33912E-03   1.0000          .0000       .10000E+07
    18 'norm      '    2.0808       1.0000          .0000       .10000E+07
    19 'Normalizat'    .74458       1.0000         .10000E-01   10.000    
    20 'Prefactor '    .99650       1.0000          .0000       10.000    
 **********
 **   15 **SET ERR    .5000    
 **********
 **********
 **   16 **SET GRAD    1.000    
 **********
 **********
 **   17 **MINIMIZE    .5860E+05   .2000E-04
 **********

 MIGRAD MINIMIZATION HAS CONVERGED.

 FCN=   43440.29     FROM MIGRAD    STATUS=CONVERGED    159 CALLS     1638 TOTAL
                     EDM=   .29E-10  STRATEGY=1  ERROR MATRIX UNCERTAINTY=  1.1%

  EXT PARAMETER                                   STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  norm           .0000        2.2850        .36313E-07** at limit **
   2  Prefactor     5.0830        13.382        .34321E-06   -.14099E-02
   3  Prefactor     56.448        5.1737        .34216E-07    .57709E-02
   4  Prefactor     2.9125        4.3109       -.56255E-07    .10270E-02
   5  norm          .62600        .38130       -.18058E-07    .44839E-02
   6  norm          12.107        2.9311        .19453E-07   -.21345E-02
   7  Prefactor     1.6405        1.8899       -.19591E-07    .64915E-03
   8  norm          .11488E-01    67.373       -.17087E-05** at limit **
   9  Prefactor     2.0644        2.3960        .16166E-07   -.27188E-03
  10  Prefactor     35.909        31.340       -.20135E-06   -.47186E-03
  11  Prefactor     .73400        1.9113        .13233E-07   -.44143E-03
  12  norm          .81182E-01    28.051        .20279E-06** at limit **
  13  norm          .34931        .67640        .66901E-08   -.56176E-03
  14  Prefactor     30.346        15.664        .40246E-07   -.26585E-02
  15  Prefactor     .32918E-07    19.907       -.25401E-06** at limit **
  16  Prefactor     8.3707        3.3441        .20948E-08    .40520E-03
  17  norm          .89595E-07    7.2943       -.37356E-07** at limit **
  18  norm          2.0826        3.1939       -.50346E-08    .11741E-03
  19  Normalizat    .74397        .18973       -.13141E-05    .71816E-05
  20  Prefactor     .99648        .30899E-01    .12625E-06    .11799E-04
                               ERR DEF=  .500    
Final values: 
  norm       = 0
  Prefactor  = 5.08296
  Prefactor  = 56.4483
  Prefactor  = 2.91248
  norm       = 0.626
  norm       = 12.1067
  Prefactor  = 1.64054
  norm       = 0.0114877
  Prefactor  = 2.06444
  Prefactor  = 35.9086
  Prefactor  = 0.734
  norm       = 0.0811824
  norm       = 0.349308
  Prefactor  = 30.3457
  Prefactor  = 3.29181e-08
  Prefactor  = 8.37073
  norm       = 8.9595e-08
  norm       = 2.08259
  Normalizat = 0.743968
  Prefactor  = 0.996484
 **********
 **   18 **HESSE 
 **********

 FCN=   43440.29     FROM HESSE     STATUS=OK           361 CALLS     1999 TOTAL
                     EDM=   .28E-05    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  norm           .0000        .36487        .42118E-02   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   2  Prefactor     5.0830        15.695        .44059E-03   -1.5663    
   3  Prefactor     56.448        24.241        .13343E-03   -1.5558    
   4  Prefactor     2.9125        4.3464        .59436E-03   -1.5674    
   5  norm          .62600        .41357        .66823E-03   -1.5692    
   6  norm          12.107        2.9898        .28764E-03   -1.5638    
   7  Prefactor     1.6405        1.9219        .82466E-03   -1.5682    
   8  norm          .11488E-01    .51555        .85227E-02   -1.5710    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
   9  Prefactor     2.0644        2.4133        .71722E-03   -1.5679    
  10  Prefactor     35.909        31.524        .16857E-03   -1.5588    
  11  Prefactor     .73400        1.9266        .59646E-03   -1.5691    
  12  norm          .81182E-01    1.6112        .66218E-02   -1.5714    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  13  norm          .34931        .70531        .95895E-03   -1.5696    
  14  Prefactor     30.346        16.150        .18115E-03   -1.5598    
  15  Prefactor     .32918E-07    23.562        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  16  Prefactor     8.3707        3.3534        .34577E-03   -1.5650    
  17  norm          .89595E-07    18.920        .42118E-03   -1.5708    
                                 WARNING -   - ABOVE PARAMETER IS AT LIMIT.
  18  norm          2.0826        3.2131        .71560E-03   -1.5679    
  19  Normalizat    .74397        .21565        .19171       -1.0218    
  20  Prefactor     .99648        .32430E-01    .29678E-01   -.92847    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 2.75304e-06
Minuit parameter uncertainties:
  1  1.77012e-06
  2  15.6951
  3  24.2415
  4  4.34641
  5  0.413574
  6  2.98976
  7  1.92192
  8  0.153916
  9  2.4133
  10  31.5245
  11  1.92659
  12  0.723322
  13  0.705311
  14  16.1496
  15  0.00176191
  16  3.35336
  17  0.0026038
  18  3.21306
  19  0.215895
  20  0.0324307
Done.

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

Extracting fit parameters...

4FGL J0535.3+0934
   Spectrum: PowerLaw
257    Prefactor:  3.035e+01  1.615e+01  0.000e+00  1.000e+06 ( 1.000e-13)
258        Index:  2.624e+00  0.000e+00  0.000e+00  1.000e+01 (-1.000e+00) fixed
259        Scale:  1.059e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  9.965e-01  3.243e-02  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
566   Normalization:  7.440e-01  2.159e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Fixed Index): 5.56
Ra Dec: 83.841 9.582
Photon Index (Fixed Index): 2.62 +/- 0.00
Photon Flux (Fixed Index): 9.14e-08 +/- 4.86e-08
Energy Flux (Fixed Index): 2.34e-05 +/- 1.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) = 43440.2208985
delta logL = 0.0733084437088

Fit tolerance = 0.0001

Performing likelihood fit...
Done.

MINUIT Return Code (Free Index): 0
logL (Free Index) = 43440.2029769
delta logL = 0.0912299975607

Fit tolerance = 1e-08

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

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

 MIGRAD MINIMIZATION HAS CONVERGED.

 MIGRAD WILL VERIFY CONVERGENCE AND ERROR MATRIX.

 FCN=   43440.20     FROM MIGRAD    STATUS=CONVERGED     55 CALLS      257 TOTAL
                     EDM=   .27E-08    STRATEGY= 1      ERR MATRIX NOT POS-DEF

  EXT PARAMETER                APPROXIMATE        STEP         FIRST   
  NO.   NAME        VALUE          ERROR          SIZE      DERIVATIVE 
   1  Prefactor     22.927        133.64        .20890E-03    .16445E-01
   2  Index         2.8529        2.0168        .15006        .72217E-03
   3  Normalizat    .72955        .72073E-01    .19343        .14900E-03
   4  Prefactor     .99786        .10757E-01    .29660E-01   -.83484E-04
                               ERR DEF=  .500    
Final values: 
  Prefactor  = 22.9272
  Index      = 2.85293
  Normalizat = 0.729554
  Prefactor  = 0.99786
 **********
 **   18 **HESSE 
 **********

 FCN=   43440.20     FROM HESSE     STATUS=OK            31 CALLS      288 TOTAL
                     EDM=   .38E-06    STRATEGY= 1      ERROR MATRIX ACCURATE 

  EXT PARAMETER                                INTERNAL      INTERNAL  
  NO.   NAME        VALUE          ERROR       STEP SIZE       VALUE   
   1  Prefactor     22.927        39.648        .83559E-05   -1.5612    
   2  Index         2.8529        1.0395        .89463E-02   -.44384    
   3  Normalizat    .72955        .17947        .86052E-03   -1.0274    
   4  Prefactor     .99786        .30714E-01    .13108E-03   -.92801    
                               ERR DEF=  .500    
Minuit fit quality: 3   estimated distance: 3.79055e-07
Minuit parameter uncertainties:
  1  39.6485
  2  1.0489
  3  0.179614
  4  0.0307144
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) = 43440.2029768
delta logL = 0.0912300818236

Extracting fit parameters...

4FGL J0535.3+0934
   Spectrum: PowerLaw
257    Prefactor:  2.293e+01  3.965e+01  0.000e+00  1.000e+06 ( 1.000e-13)
258        Index:  2.853e+00  1.049e+00  0.000e+00  1.000e+01 (-1.000e+00)
259        Scale:  1.059e+03  0.000e+00  3.000e+01  5.000e+05 ( 1.000e+00) fixed

GAL_V02
   Spectrum: PowerLaw
567    Prefactor:  9.979e-01  3.071e-02  0.000e+00  1.000e+01 ( 1.000e+00)
568        Index:  0.000e+00  0.000e+00 -1.000e+00  1.000e+00 ( 1.000e+00) fixed
569        Scale:  1.000e+02  0.000e+00  5.000e+01  2.000e+02 ( 1.000e+00) fixed

EG_v02
   Spectrum: FileFunction
566   Normalization:  7.296e-01  1.796e-01  1.000e-02  1.000e+01 ( 1.000e+00)


TS (Free Index): 5.82
Ra Dec: 83.841 9.582
Photon Index (Free Index): 2.85 +/- 1.05
Photon Flux (Free Index): 1.04e-07 +/- 5.61e-08
Energy Flux (Free Index): 2.25e-05 +/- 1.40e-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/28615391/cmap_HighResolution_713145601_713750401_4FGL_J0535.3+0934_weekly_bin784.png

Cleaning up...

** Nuclear option initiated! **

Updating database...

UPDATE lightcurve_data_v2 SET comment='SUCCESS', photon_flux='9.14e-08', energy_flux2='2.25e-05', photon_flux_error='4.86e-08', dlogl='9.12e-02', energy_flux='2.34e-05', photon_flux2='1.04e-07', job_status='DONE', time_completed='2023-09-19 23:00:42.145269', photon_index_error2='1.05', photon_index2='2.85', ts='5.56', fit_tolerance='1e-08', GAL='1.00', photon_index_error='0.00', energy_flux_error2='1.40e-05', EG='0.74', time_epoch_completed='1695189642.15', return_code='0', job_id='28615391', GAL2='1.00', EG2='0.73', return_code2='0', energy_flux_error='1.25e-05', photon_flux_error2='5.61e-08', ts2='5.82', photon_index='2.62' WHERE bin_id='784' AND source_name='4FGL J0535.3+0934' AND cadence='weekly';

Database successfully updated.


Analysis Complete.


Tue Sep 19 23:00:42 PDT 2023

