These are the deals that are available for Saltpetre:
Which deal we take depends on whether we intend to allow it to run for 20 turns or stop it early. If we are to stop it early we either need a deal where we pay up front so we do not lose our reputation if we stop it, make the Romans declare on us (a gamble they may not do this), or accept that our reputation is dead (something we'd probably prefer to avoid).
Deals that we pay up front so we don't ruin our reputation if we stop early:
Option 1: We give: 873 gold. Rome gives: Saltpetre.
We give: Physics. Rome gives: Saltpetre, 78gpt (all they have), Incense. But if we sell Physics we need to look at other deals available and if we are stopping the deal early do them first so that we don't lose so much gpt when the deal is stopped. Persia for example has lots of gpt on offer, so we should sell it around first eg:
Option 2a:
1.We give Physics, Persia gives 139gpt + 197 gold
2. We give Physics, France gives 19gpt + 45 gold (this is all the gpt they have so we should still get it all, but we should check the Roman deal before doing this as depending on how long it is to run we may be able to get more gold overall even if the deal runs for a shorter time)
3. We give Physics, Rome gives Saltpetre and as much gpt as they will give (or France if we sold to Rome in step 2)
Option 2b:
1. We give Physics, Persia gives 139gpt + 197 gold
2. We give Physics, Rome gives Saltpetre and as much gpt as they will give.
3. We sell Democracy OR Magnetism to France for 19gpt + 45 gold
Deals that we pay per turn so we either have to let run 20 turns, break and ruin our reputation, or have to get Rome to declare on us:
Option 3: We give: 48gpt + 9 gold. Rome gives Saltpetre
Option 4: We give: Wines, 35gpt + 3gold. Rome gives Saltpetre.
Option 5: We give: Wines, 633 gold. Rome gives Saltpetre.
I think I would prefer to do option 2 (see edit below for which) and trade Physics as this is a good trade with Persia anyway.
Troop Upgrades
We then need to look at the cost of Upgrades:
25 Knights to Cavalry (3 of our 28 Knights are Elite so won't be upgraded) @ 30 gold each = 750 gold
13 Trebuchets to Cannon @ 30 gold each = 390 gold
Total for Cavalry and Cannon (offensive troops) = 1140 gold
17 Hoplites to Muskets (defensive troops) (1 of our 18 Hoplites is Elite so won't be upgraded) @ 120 gold each = 2040 gold
Total upgrade cost = 3180 gold
Our current treasury is 3114 gold and we are at 70% science to give Magnetism in 2 turns at -79 gpt.
We can not currently afford to upgrade all our troops, although we could afford to upgrade all our offensive troops and most of the defence. The sale of Physics will bring in further gpt to fund our science spending, and bring in more gold to allow us to upgrade the remainder and still rush culture in Rome when we need to.
As a comparison:
Veteran Knight v Veteran Musket fortified in a City on flat land: 20% chance the Knight wins.
Veteran Cavalry v Veteran Musket fortified in a City on flat land: 38% chance the Cavalry wins, still not a cakewalk, but nearly double the chance of the Knight.
Personally I feel that the Romans will already have upgraded the majority of their Pikes to Muskets already. They have Leonado's so it will only cost 45 gold each compared to the usual cost of 90. Our Hoplites cost us 120 each to upgrade as they are the equivalent of upgrading from Spearmen.
edit: I've edited in comments suggestions from TimBentley & Ravensfire.
Option 2b would give us the greatest return from the sale of Physics and get us deal for Saltpetre where we pay in full upfront so we will be able to stop the deal early if we wish. We have the choice of what we sell France, Metallurgy is the cheapest of the techs, but Democracy is an optional one. By selling one of these now we should be able to sell them Physics later.